Class: ClaudeAgentSDK::ToolsPreset

Inherits:
Type
  • Object
show all
Defined in:
lib/claude_agent_sdk/types.rb

Overview

Tools preset configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#[], #[]=, from_hash, wrap

Constructor Details

#initialize(attributes = {}) ⇒ ToolsPreset

Returns a new instance of ToolsPreset.



1553
1554
1555
1556
# File 'lib/claude_agent_sdk/types.rb', line 1553

def initialize(attributes = {})
  super
  @type = 'preset'
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type

Instance Attribute Details

#presetObject

Returns the value of attribute preset.



1551
1552
1553
# File 'lib/claude_agent_sdk/types.rb', line 1551

def preset
  @preset
end

#typeObject (readonly)

Returns the value of attribute type.



1550
1551
1552
# File 'lib/claude_agent_sdk/types.rb', line 1550

def type
  @type
end

Instance Method Details

#to_hObject



1558
1559
1560
# File 'lib/claude_agent_sdk/types.rb', line 1558

def to_h
  { type: @type, preset: @preset }
end