Class: ClaudeAgentSDK::SystemPromptPreset

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

Overview

System prompt preset configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(preset:, append: nil) ⇒ SystemPromptPreset

Returns a new instance of SystemPromptPreset.



748
749
750
751
752
# File 'lib/claude_agent_sdk/types.rb', line 748

def initialize(preset:, append: nil)
  @type = 'preset'
  @preset = preset
  @append = append
end

Instance Attribute Details

#appendObject

Returns the value of attribute append.



746
747
748
# File 'lib/claude_agent_sdk/types.rb', line 746

def append
  @append
end

#presetObject

Returns the value of attribute preset.



746
747
748
# File 'lib/claude_agent_sdk/types.rb', line 746

def preset
  @preset
end

#typeObject

Returns the value of attribute type.



746
747
748
# File 'lib/claude_agent_sdk/types.rb', line 746

def type
  @type
end

Instance Method Details

#to_hObject



754
755
756
757
758
# File 'lib/claude_agent_sdk/types.rb', line 754

def to_h
  result = { type: @type, preset: @preset }
  result[:append] = @append if @append
  result
end