Class: ClaudeAgentSDK::SystemPromptPreset

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

Overview

System prompt preset configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

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

Constructor Details

#initialize(attributes = {}) ⇒ SystemPromptPreset

Returns a new instance of SystemPromptPreset.



1519
1520
1521
1522
# File 'lib/claude_agent_sdk/types.rb', line 1519

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

#appendObject

Returns the value of attribute append.



1517
1518
1519
# File 'lib/claude_agent_sdk/types.rb', line 1517

def append
  @append
end

#exclude_dynamic_sectionsObject

Returns the value of attribute exclude_dynamic_sections.



1517
1518
1519
# File 'lib/claude_agent_sdk/types.rb', line 1517

def exclude_dynamic_sections
  @exclude_dynamic_sections
end

#presetObject

Returns the value of attribute preset.



1517
1518
1519
# File 'lib/claude_agent_sdk/types.rb', line 1517

def preset
  @preset
end

#typeObject (readonly)

Returns the value of attribute type.



1516
1517
1518
# File 'lib/claude_agent_sdk/types.rb', line 1516

def type
  @type
end

Instance Method Details

#to_hObject



1524
1525
1526
1527
1528
1529
# File 'lib/claude_agent_sdk/types.rb', line 1524

def to_h
  result = { type: @type, preset: @preset }
  result[:append] = @append if @append
  result[:exclude_dynamic_sections] = @exclude_dynamic_sections unless @exclude_dynamic_sections.nil?
  result
end