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.



1114
1115
1116
1117
1118
1119
# File 'lib/claude_agent_sdk/types.rb', line 1114

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.



1112
1113
1114
# File 'lib/claude_agent_sdk/types.rb', line 1112

def event
  @event
end

#file_pathObject

Returns the value of attribute file_path.



1112
1113
1114
# File 'lib/claude_agent_sdk/types.rb', line 1112

def file_path
  @file_path
end

#hook_event_nameObject

Returns the value of attribute hook_event_name.



1112
1113
1114
# File 'lib/claude_agent_sdk/types.rb', line 1112

def hook_event_name
  @hook_event_name
end