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.
1187 1188 1189 1190 1191 |
# File 'lib/claude_agent_sdk/types.rb', line 1187 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.
1185 1186 1187 |
# File 'lib/claude_agent_sdk/types.rb', line 1185 def additional_context @additional_context end |
#hook_event_name ⇒ Object
Returns the value of attribute hook_event_name.
1185 1186 1187 |
# File 'lib/claude_agent_sdk/types.rb', line 1185 def hook_event_name @hook_event_name end |
#updated_mcp_tool_output ⇒ Object
Returns the value of attribute updated_mcp_tool_output.
1185 1186 1187 |
# File 'lib/claude_agent_sdk/types.rb', line 1185 def updated_mcp_tool_output @updated_mcp_tool_output end |
Instance Method Details
#to_h ⇒ Object
1193 1194 1195 1196 1197 1198 |
# File 'lib/claude_agent_sdk/types.rb', line 1193 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 |