Class: ClaudeAgentSDK::SyncHookJSONOutput
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::SyncHookJSONOutput
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Sync hook JSON output
Instance Attribute Summary collapse
-
#continue ⇒ Object
Returns the value of attribute continue.
-
#decision ⇒ Object
Returns the value of attribute decision.
-
#hook_specific_output ⇒ Object
Returns the value of attribute hook_specific_output.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#stop_reason ⇒ Object
Returns the value of attribute stop_reason.
-
#suppress_output ⇒ Object
Returns the value of attribute suppress_output.
-
#system_message ⇒ Object
Returns the value of attribute system_message.
Instance Method Summary collapse
-
#initialize(continue: true, suppress_output: false, stop_reason: nil, decision: nil, system_message: nil, reason: nil, hook_specific_output: nil) ⇒ SyncHookJSONOutput
constructor
A new instance of SyncHookJSONOutput.
- #to_h ⇒ Object
Constructor Details
#initialize(continue: true, suppress_output: false, stop_reason: nil, decision: nil, system_message: nil, reason: nil, hook_specific_output: nil) ⇒ SyncHookJSONOutput
Returns a new instance of SyncHookJSONOutput.
563 564 565 566 567 568 569 570 571 572 |
# File 'lib/claude_agent_sdk/types.rb', line 563 def initialize(continue: true, suppress_output: false, stop_reason: nil, decision: nil, system_message: nil, reason: nil, hook_specific_output: nil) @continue = continue @suppress_output = suppress_output @stop_reason = stop_reason @decision = decision @system_message = @reason = reason @hook_specific_output = hook_specific_output end |
Instance Attribute Details
#continue ⇒ Object
Returns the value of attribute continue.
560 561 562 |
# File 'lib/claude_agent_sdk/types.rb', line 560 def continue @continue end |
#decision ⇒ Object
Returns the value of attribute decision.
560 561 562 |
# File 'lib/claude_agent_sdk/types.rb', line 560 def decision @decision end |
#hook_specific_output ⇒ Object
Returns the value of attribute hook_specific_output.
560 561 562 |
# File 'lib/claude_agent_sdk/types.rb', line 560 def hook_specific_output @hook_specific_output end |
#reason ⇒ Object
Returns the value of attribute reason.
560 561 562 |
# File 'lib/claude_agent_sdk/types.rb', line 560 def reason @reason end |
#stop_reason ⇒ Object
Returns the value of attribute stop_reason.
560 561 562 |
# File 'lib/claude_agent_sdk/types.rb', line 560 def stop_reason @stop_reason end |
#suppress_output ⇒ Object
Returns the value of attribute suppress_output.
560 561 562 |
# File 'lib/claude_agent_sdk/types.rb', line 560 def suppress_output @suppress_output end |
#system_message ⇒ Object
Returns the value of attribute system_message.
560 561 562 |
# File 'lib/claude_agent_sdk/types.rb', line 560 def @system_message end |
Instance Method Details
#to_h ⇒ Object
574 575 576 577 578 579 580 581 582 583 |
# File 'lib/claude_agent_sdk/types.rb', line 574 def to_h result = { continue: @continue } result[:suppressOutput] = @suppress_output if @suppress_output result[:stopReason] = @stop_reason if @stop_reason result[:decision] = @decision if @decision result[:systemMessage] = @system_message if @system_message result[:reason] = @reason if @reason result[:hookSpecificOutput] = @hook_specific_output.to_h if @hook_specific_output result end |