Class: ClaudeAgentSDK::PostToolUseHookSpecificOutput
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::PostToolUseHookSpecificOutput
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
PostToolUse hook specific output
Instance Attribute Summary collapse
-
#additional_context ⇒ Object
Returns the value of attribute additional_context.
-
#hook_event_name ⇒ Object
Returns the value of attribute hook_event_name.
-
#updated_mcp_tool_output ⇒ Object
Returns the value of attribute updated_mcp_tool_output.
Instance Method Summary collapse
-
#initialize(additional_context: nil, updated_mcp_tool_output: nil) ⇒ PostToolUseHookSpecificOutput
constructor
A new instance of PostToolUseHookSpecificOutput.
- #to_h ⇒ Object
Constructor Details
#initialize(additional_context: nil, updated_mcp_tool_output: nil) ⇒ PostToolUseHookSpecificOutput
Returns a new instance of PostToolUseHookSpecificOutput.
470 471 472 473 474 |
# File 'lib/claude_agent_sdk/types.rb', line 470 def initialize(additional_context: nil, updated_mcp_tool_output: nil) @hook_event_name = 'PostToolUse' @additional_context = additional_context @updated_mcp_tool_output = updated_mcp_tool_output end |
Instance Attribute Details
#additional_context ⇒ Object
Returns the value of attribute additional_context.
468 469 470 |
# File 'lib/claude_agent_sdk/types.rb', line 468 def additional_context @additional_context end |
#hook_event_name ⇒ Object
Returns the value of attribute hook_event_name.
468 469 470 |
# File 'lib/claude_agent_sdk/types.rb', line 468 def hook_event_name @hook_event_name end |
#updated_mcp_tool_output ⇒ Object
Returns the value of attribute updated_mcp_tool_output.
468 469 470 |
# File 'lib/claude_agent_sdk/types.rb', line 468 def updated_mcp_tool_output @updated_mcp_tool_output end |
Instance Method Details
#to_h ⇒ Object
476 477 478 479 480 481 |
# File 'lib/claude_agent_sdk/types.rb', line 476 def to_h result = { hookEventName: @hook_event_name } result[:additionalContext] = @additional_context if @additional_context result[:updatedMCPToolOutput] = @updated_mcp_tool_output if @updated_mcp_tool_output result end |