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.
514 515 516 517 |
# File 'lib/claude_agent_sdk/types.rb', line 514 def initialize(decision: nil) @hook_event_name = 'PermissionRequest' @decision = decision end |
Instance Attribute Details
#decision ⇒ Object
Returns the value of attribute decision.
512 513 514 |
# File 'lib/claude_agent_sdk/types.rb', line 512 def decision @decision end |
#hook_event_name ⇒ Object
Returns the value of attribute hook_event_name.
512 513 514 |
# File 'lib/claude_agent_sdk/types.rb', line 512 def hook_event_name @hook_event_name end |
Instance Method Details
#to_h ⇒ Object
519 520 521 522 523 |
# File 'lib/claude_agent_sdk/types.rb', line 519 def to_h result = { hookEventName: @hook_event_name } result[:decision] = @decision if @decision result end |