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.



1199
1200
1201
1202
# File 'lib/claude_agent_sdk/types.rb', line 1199

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.



1197
1198
1199
# File 'lib/claude_agent_sdk/types.rb', line 1197

def async
  @async
end

#async_timeoutObject

Returns the value of attribute async_timeout.



1197
1198
1199
# File 'lib/claude_agent_sdk/types.rb', line 1197

def async_timeout
  @async_timeout
end

Instance Method Details

#to_hObject



1204
1205
1206
1207
1208
# File 'lib/claude_agent_sdk/types.rb', line 1204

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