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.
423 424 425 426 427 |
# File 'lib/claude_agent_sdk/types.rb', line 423 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.
421 422 423 |
# File 'lib/claude_agent_sdk/types.rb', line 421 def additional_context @additional_context end |
#hook_event_name ⇒ Object
Returns the value of attribute hook_event_name.
421 422 423 |
# File 'lib/claude_agent_sdk/types.rb', line 421 def hook_event_name @hook_event_name end |
#updated_mcp_tool_output ⇒ Object
Returns the value of attribute updated_mcp_tool_output.
421 422 423 |
# File 'lib/claude_agent_sdk/types.rb', line 421 def updated_mcp_tool_output @updated_mcp_tool_output end |
Instance Method Details
#to_h ⇒ Object
429 430 431 432 433 434 |
# File 'lib/claude_agent_sdk/types.rb', line 429 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 |