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.



1183
1184
1185
1186
# File 'lib/claude_agent_sdk/types.rb', line 1183

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.



1181
1182
1183
# File 'lib/claude_agent_sdk/types.rb', line 1181

def async
  @async
end

#async_timeoutObject

Returns the value of attribute async_timeout.



1181
1182
1183
# File 'lib/claude_agent_sdk/types.rb', line 1181

def async_timeout
  @async_timeout
end

Instance Method Details

#to_hObject



1188
1189
1190
1191
1192
# File 'lib/claude_agent_sdk/types.rb', line 1188

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