Class: ClaudeAgentSDK::PreToolUseHookSpecificOutput
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
PreToolUse hook specific output
Instance Attribute Summary collapse
-
#additional_context ⇒ Object
Returns the value of attribute additional_context.
-
#hook_event_name ⇒ Object
readonly
Returns the value of attribute hook_event_name.
-
#permission_decision ⇒ Object
Returns the value of attribute permission_decision.
-
#permission_decision_reason ⇒ Object
Returns the value of attribute permission_decision_reason.
-
#updated_input ⇒ Object
Returns the value of attribute updated_input.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ PreToolUseHookSpecificOutput
constructor
A new instance of PreToolUseHookSpecificOutput.
- #to_h ⇒ Object
Methods inherited from Type
Constructor Details
#initialize(attributes = {}) ⇒ PreToolUseHookSpecificOutput
Returns a new instance of PreToolUseHookSpecificOutput.
1114 1115 1116 1117 |
# File 'lib/claude_agent_sdk/types.rb', line 1114 def initialize(attributes = {}) super @hook_event_name = 'PreToolUse' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type
Instance Attribute Details
#additional_context ⇒ Object
Returns the value of attribute additional_context.
1110 1111 1112 |
# File 'lib/claude_agent_sdk/types.rb', line 1110 def additional_context @additional_context end |
#hook_event_name ⇒ Object (readonly)
Returns the value of attribute hook_event_name.
1112 1113 1114 |
# File 'lib/claude_agent_sdk/types.rb', line 1112 def hook_event_name @hook_event_name end |
#permission_decision ⇒ Object
Returns the value of attribute permission_decision.
1110 1111 1112 |
# File 'lib/claude_agent_sdk/types.rb', line 1110 def @permission_decision end |
#permission_decision_reason ⇒ Object
Returns the value of attribute permission_decision_reason.
1110 1111 1112 |
# File 'lib/claude_agent_sdk/types.rb', line 1110 def @permission_decision_reason end |
#updated_input ⇒ Object
Returns the value of attribute updated_input.
1110 1111 1112 |
# File 'lib/claude_agent_sdk/types.rb', line 1110 def updated_input @updated_input end |
Instance Method Details
#to_h ⇒ Object
1119 1120 1121 1122 1123 1124 1125 1126 |
# File 'lib/claude_agent_sdk/types.rb', line 1119 def to_h result = { hookEventName: @hook_event_name } result[:permissionDecision] = @permission_decision if @permission_decision result[:permissionDecisionReason] = @permission_decision_reason if @permission_decision_reason result[:updatedInput] = @updated_input if @updated_input result[:additionalContext] = @additional_context if @additional_context result end |