Class: 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(attributes = {}) ⇒ SyncHookJSONOutput
constructor
A new instance of SyncHookJSONOutput.
- #to_h ⇒ Object
Methods inherited from Type
Constructor Details
#initialize(attributes = {}) ⇒ SyncHookJSONOutput
Returns a new instance of SyncHookJSONOutput.
1329 1330 1331 1332 1333 |
# File 'lib/claude_agent_sdk/types.rb', line 1329 def initialize(attributes = {}) super @continue = true if @continue.nil? @suppress_output = false if @suppress_output.nil? end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type
Instance Attribute Details
#continue ⇒ Object
Returns the value of attribute continue.
1326 1327 1328 |
# File 'lib/claude_agent_sdk/types.rb', line 1326 def continue @continue end |
#decision ⇒ Object
Returns the value of attribute decision.
1326 1327 1328 |
# File 'lib/claude_agent_sdk/types.rb', line 1326 def decision @decision end |
#hook_specific_output ⇒ Object
Returns the value of attribute hook_specific_output.
1326 1327 1328 |
# File 'lib/claude_agent_sdk/types.rb', line 1326 def hook_specific_output @hook_specific_output end |
#reason ⇒ Object
Returns the value of attribute reason.
1326 1327 1328 |
# File 'lib/claude_agent_sdk/types.rb', line 1326 def reason @reason end |
#stop_reason ⇒ Object
Returns the value of attribute stop_reason.
1326 1327 1328 |
# File 'lib/claude_agent_sdk/types.rb', line 1326 def stop_reason @stop_reason end |
#suppress_output ⇒ Object
Returns the value of attribute suppress_output.
1326 1327 1328 |
# File 'lib/claude_agent_sdk/types.rb', line 1326 def suppress_output @suppress_output end |
#system_message ⇒ Object
Returns the value of attribute system_message.
1326 1327 1328 |
# File 'lib/claude_agent_sdk/types.rb', line 1326 def @system_message end |
Instance Method Details
#to_h ⇒ Object
1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 |
# File 'lib/claude_agent_sdk/types.rb', line 1335 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 |