Class: ClaudeAgentSDK::SystemMessage
- 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.
Direct Known Subclasses
APIRetryMessage, CompactBoundaryMessage, ElicitationCompleteMessage, FilesPersistedMessage, HookProgressMessage, HookResponseMessage, HookStartedMessage, InitMessage, LocalCommandOutputMessage, SessionStateChangedMessage, StatusMessage, TaskNotificationMessage, TaskProgressMessage, TaskStartedMessage
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#subtype ⇒ Object
Returns the value of attribute subtype.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ SystemMessage
constructor
A new instance of SystemMessage.
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
#data ⇒ Object
Returns the value of attribute data.
227 228 229 |
# File 'lib/claude_agent_sdk/types.rb', line 227 def data @data end |
#subtype ⇒ Object
Returns the value of attribute subtype.
227 228 229 |
# File 'lib/claude_agent_sdk/types.rb', line 227 def subtype @subtype end |