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, exclude_dynamic_sections: nil) ⇒ SystemPromptPreset

Returns a new instance of SystemPromptPreset.



1767
1768
1769
1770
1771
1772
# File 'lib/claude_agent_sdk/types.rb', line 1767

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

Instance Attribute Details

#appendObject

Returns the value of attribute append.



1765
1766
1767
# File 'lib/claude_agent_sdk/types.rb', line 1765

def append
  @append
end

#exclude_dynamic_sectionsObject

Returns the value of attribute exclude_dynamic_sections.



1765
1766
1767
# File 'lib/claude_agent_sdk/types.rb', line 1765

def exclude_dynamic_sections
  @exclude_dynamic_sections
end

#presetObject

Returns the value of attribute preset.



1765
1766
1767
# File 'lib/claude_agent_sdk/types.rb', line 1765

def preset
  @preset
end

#typeObject

Returns the value of attribute type.



1765
1766
1767
# File 'lib/claude_agent_sdk/types.rb', line 1765

def type
  @type
end

Instance Method Details

#to_hObject



1774
1775
1776
1777
1778
1779
# File 'lib/claude_agent_sdk/types.rb', line 1774

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