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.
1248 1249 1250 1251 |
# File 'lib/claude_agent_sdk/types.rb', line 1248 def initialize(decision: nil) @hook_event_name = 'PermissionRequest' @decision = decision end |
Instance Attribute Details
#decision ⇒ Object
Returns the value of attribute decision.
1246 1247 1248 |
# File 'lib/claude_agent_sdk/types.rb', line 1246 def decision @decision end |
#hook_event_name ⇒ Object
Returns the value of attribute hook_event_name.
1246 1247 1248 |
# File 'lib/claude_agent_sdk/types.rb', line 1246 def hook_event_name @hook_event_name end |
Instance Method Details
#to_h ⇒ Object
1253 1254 1255 1256 1257 |
# File 'lib/claude_agent_sdk/types.rb', line 1253 def to_h result = { hookEventName: @hook_event_name } result[:decision] = @decision if @decision result end |