Class: ClaudeAgentSDK::UnknownHookInput

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

Overview

Fallback for hook events the SDK does not yet model. Carries the wire event name and the complete raw payload so no fields are lost (Python passes hook input through as a raw dict, so unknown events lose nothing there).

Instance Attribute Summary collapse

Attributes inherited from BaseHookInput

#cwd, #hook_event_name, #permission_mode, #session_id, #transcript_path

Instance Method Summary collapse

Methods inherited from Type

#[], #[]=, from_hash, #to_h, wrap

Constructor Details

#initialize(attributes = {}) ⇒ UnknownHookInput

Returns a new instance of UnknownHookInput.



1082
1083
1084
1085
1086
1087
1088
# File 'lib/claude_agent_sdk/types.rb', line 1082

def initialize(attributes = {})
  super
  # Direct assignment: BaseHookInput exposes hook_event_name as
  # attr_reader only, and Type#assign_attribute silently drops keys
  # without public setters.
  @hook_event_name = attributes[:hook_event_name] || attributes['hook_event_name']
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type

Instance Attribute Details

#raw_inputObject

Returns the value of attribute raw_input.



1080
1081
1082
# File 'lib/claude_agent_sdk/types.rb', line 1080

def raw_input
  @raw_input
end