Class: ClaudeAgentSDK::AsyncHookJSONOutput

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

Overview

Async hook JSON output

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(async: true, async_timeout: nil) ⇒ AsyncHookJSONOutput

Returns a new instance of AsyncHookJSONOutput.



1349
1350
1351
1352
# File 'lib/claude_agent_sdk/types.rb', line 1349

def initialize(async: true, async_timeout: nil)
  @async = async
  @async_timeout = async_timeout
end

Instance Attribute Details

#asyncObject

Returns the value of attribute async.



1347
1348
1349
# File 'lib/claude_agent_sdk/types.rb', line 1347

def async
  @async
end

#async_timeoutObject

Returns the value of attribute async_timeout.



1347
1348
1349
# File 'lib/claude_agent_sdk/types.rb', line 1347

def async_timeout
  @async_timeout
end

Instance Method Details

#to_hObject



1354
1355
1356
1357
1358
# File 'lib/claude_agent_sdk/types.rb', line 1354

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