Class: ClaudeAgentSDK::AsyncHookJSONOutput
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::AsyncHookJSONOutput
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Async hook JSON output
Instance Attribute Summary collapse
-
#async ⇒ Object
Returns the value of attribute async.
-
#async_timeout ⇒ Object
Returns the value of attribute async_timeout.
Instance Method Summary collapse
-
#initialize(async: true, async_timeout: nil) ⇒ AsyncHookJSONOutput
constructor
A new instance of AsyncHookJSONOutput.
- #to_h ⇒ Object
Constructor Details
#initialize(async: true, async_timeout: nil) ⇒ AsyncHookJSONOutput
Returns a new instance of AsyncHookJSONOutput.
537 538 539 540 |
# File 'lib/claude_agent_sdk/types.rb', line 537 def initialize(async: true, async_timeout: nil) @async = async @async_timeout = async_timeout end |
Instance Attribute Details
#async ⇒ Object
Returns the value of attribute async.
535 536 537 |
# File 'lib/claude_agent_sdk/types.rb', line 535 def async @async end |
#async_timeout ⇒ Object
Returns the value of attribute async_timeout.
535 536 537 |
# File 'lib/claude_agent_sdk/types.rb', line 535 def async_timeout @async_timeout end |
Instance Method Details
#to_h ⇒ Object
542 543 544 545 546 |
# File 'lib/claude_agent_sdk/types.rb', line 542 def to_h result = { async: @async } result[:asyncTimeout] = @async_timeout if @async_timeout result end |