Class: ClaudeAgentSDK::PermissionRequestHookSpecificOutput
- Inherits:
-
Object
- Object
- ClaudeAgentSDK::PermissionRequestHookSpecificOutput
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
PermissionRequest hook specific output
Instance Attribute Summary collapse
-
#decision ⇒ Object
Returns the value of attribute decision.
-
#hook_event_name ⇒ Object
Returns the value of attribute hook_event_name.
Instance Method Summary collapse
-
#initialize(decision: nil) ⇒ PermissionRequestHookSpecificOutput
constructor
A new instance of PermissionRequestHookSpecificOutput.
- #to_h ⇒ Object
Constructor Details
#initialize(decision: nil) ⇒ PermissionRequestHookSpecificOutput
Returns a new instance of PermissionRequestHookSpecificOutput.
552 553 554 555 |
# File 'lib/claude_agent_sdk/types.rb', line 552 def initialize(decision: nil) @hook_event_name = 'PermissionRequest' @decision = decision end |
Instance Attribute Details
#decision ⇒ Object
Returns the value of attribute decision.
550 551 552 |
# File 'lib/claude_agent_sdk/types.rb', line 550 def decision @decision end |
#hook_event_name ⇒ Object
Returns the value of attribute hook_event_name.
550 551 552 |
# File 'lib/claude_agent_sdk/types.rb', line 550 def hook_event_name @hook_event_name end |
Instance Method Details
#to_h ⇒ Object
557 558 559 560 561 |
# File 'lib/claude_agent_sdk/types.rb', line 557 def to_h result = { hookEventName: @hook_event_name } result[:decision] = @decision if @decision result end |