Class: ClaudeAgentSDK::SystemMessage

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

Overview

System message with metadata. When constructed from a raw CLI hash, the whole hash is stored in ‘#data` unless the caller explicitly provides a `:data` entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

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

Constructor Details

#initialize(attributes = {}) ⇒ SystemMessage

Returns a new instance of SystemMessage.



229
230
231
232
# File 'lib/claude_agent_sdk/types.rb', line 229

def initialize(attributes = {})
  super
  @data ||= attributes if attributes.is_a?(Hash)
end

Dynamic Method Handling

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

Instance Attribute Details

#dataObject

Returns the value of attribute data.



227
228
229
# File 'lib/claude_agent_sdk/types.rb', line 227

def data
  @data
end

#subtypeObject

Returns the value of attribute subtype.



227
228
229
# File 'lib/claude_agent_sdk/types.rb', line 227

def subtype
  @subtype
end