Class: ClaudeAgentSDK::AsyncHookJSONOutput

Inherits:
Type
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

Async hook JSON output

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

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

Constructor Details

#initialize(attributes = {}) ⇒ AsyncHookJSONOutput

Returns a new instance of AsyncHookJSONOutput.



1064
1065
1066
1067
# File 'lib/claude_agent_sdk/types.rb', line 1064

def initialize(attributes = {})
  super
  @async = true if @async.nil?
end

Dynamic Method Handling

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

Instance Attribute Details

#asyncObject

Returns the value of attribute async.



1062
1063
1064
# File 'lib/claude_agent_sdk/types.rb', line 1062

def async
  @async
end

#async_timeoutObject

Returns the value of attribute async_timeout.



1062
1063
1064
# File 'lib/claude_agent_sdk/types.rb', line 1062

def async_timeout
  @async_timeout
end

Instance Method Details

#to_hObject



1069
1070
1071
1072
1073
# File 'lib/claude_agent_sdk/types.rb', line 1069

def to_h
  result = { async: @async }
  result[:asyncTimeout] = @async_timeout if @async_timeout
  result
end