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.



907
908
909
910
911
912
913
# File 'lib/claude_agent_sdk/types.rb', line 907

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.



905
906
907
# File 'lib/claude_agent_sdk/types.rb', line 905

def raw_input
  @raw_input
end