Class: ClaudeAgentSDK::SystemPromptFile

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

Overview

System prompt file configuration — loads system prompt from a file path

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

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

Constructor Details

#initialize(attributes = {}) ⇒ SystemPromptFile

Returns a new instance of SystemPromptFile.



1504
1505
1506
1507
# File 'lib/claude_agent_sdk/types.rb', line 1504

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

Dynamic Method Handling

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

Instance Attribute Details

#pathObject

Returns the value of attribute path.



1501
1502
1503
# File 'lib/claude_agent_sdk/types.rb', line 1501

def path
  @path
end

#typeObject (readonly)

Returns the value of attribute type.



1502
1503
1504
# File 'lib/claude_agent_sdk/types.rb', line 1502

def type
  @type
end

Instance Method Details

#to_hObject



1509
1510
1511
# File 'lib/claude_agent_sdk/types.rb', line 1509

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