Class: ClaudeAgentSDK::SystemPromptCustom
- Includes:
- Type::OptionValue
- Defined in:
- lib/claude_agent_sdk/types/option_values.rb,
sig/claude_agent_sdk/types/option_values.rbs
Overview
The object form of a String system prompt, so snapshot can be set.
Instance Attribute Summary collapse
-
#prompt ⇒ String?
Returns the value of attribute prompt.
-
#snapshot ⇒ Boolean?
Returns the value of attribute snapshot.
-
#type ⇒ String
readonly
"custom".
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SystemPromptCustom
constructor
A new instance of SystemPromptCustom.
- #to_h ⇒ Hash[Symbol, untyped]
Methods included from Type::OptionValue
Methods inherited from Type
#[], #[]=, attr_accessor, attr_reader, attr_writer, attribute?, attribute_method?, attribute_names, cache_attribute_reader, cache_attribute_writer, cached_attribute_reader, cached_attribute_writer, declare_attributes, deep_dup_for_options, #dup_for_options, from_hash, #inspect, inspect_filtered, inspect_filtered_attributes, strict_attributes, strict_attributes?, #to_s, wrap
Constructor Details
#initialize(prompt:, snapshot:) ⇒ void #initialize(attributes) ⇒ void
Returns a new instance of SystemPromptCustom.
272 273 274 275 |
# File 'lib/claude_agent_sdk/types/option_values.rb', line 272 def initialize(attributes = {}) super @type = 'custom' end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type
Instance Attribute Details
#prompt ⇒ String?
Returns the value of attribute prompt.
270 271 272 |
# File 'lib/claude_agent_sdk/types/option_values.rb', line 270 def prompt @prompt end |
#snapshot ⇒ Boolean?
Returns the value of attribute snapshot.
270 271 272 |
# File 'lib/claude_agent_sdk/types/option_values.rb', line 270 def snapshot @snapshot end |
#type ⇒ String (readonly)
"custom".
223 224 225 |
# File 'sig/claude_agent_sdk/types/option_values.rbs', line 223 def type @type end |
Instance Method Details
#to_h ⇒ Hash[Symbol, untyped]
277 278 279 280 281 |
# File 'lib/claude_agent_sdk/types/option_values.rb', line 277 def to_h result = { type: @type, prompt: @prompt } result[:snapshot] = @snapshot unless @snapshot.nil? result end |