Class: ClaudeAgentSDK::FileChangedHookInput

Inherits:
BaseHookInput show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

FileChanged hook input

Instance Attribute Summary collapse

Attributes inherited from BaseHookInput

#cwd, #permission_mode, #session_id, #transcript_path

Instance Method Summary collapse

Constructor Details

#initialize(hook_event_name: 'FileChanged', file_path: nil, event: nil, **base_args) ⇒ FileChangedHookInput

Returns a new instance of FileChangedHookInput.



1135
1136
1137
1138
1139
1140
# File 'lib/claude_agent_sdk/types.rb', line 1135

def initialize(hook_event_name: 'FileChanged', file_path: nil, event: nil, **base_args)
  super(**base_args)
  @hook_event_name = hook_event_name
  @file_path = file_path
  @event = event # "change", "add", or "unlink"
end

Instance Attribute Details

#eventObject

Returns the value of attribute event.



1133
1134
1135
# File 'lib/claude_agent_sdk/types.rb', line 1133

def event
  @event
end

#file_pathObject

Returns the value of attribute file_path.



1133
1134
1135
# File 'lib/claude_agent_sdk/types.rb', line 1133

def file_path
  @file_path
end

#hook_event_nameObject

Returns the value of attribute hook_event_name.



1133
1134
1135
# File 'lib/claude_agent_sdk/types.rb', line 1133

def hook_event_name
  @hook_event_name
end