Class: ClaudeCodeSDK::UserMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/claude_code_sdk/messages.rb

Overview

User input message

Instance Attribute Summary collapse

Attributes inherited from Message

#id, #type

Instance Method Summary collapse

Constructor Details

#initialize(id:, text:) ⇒ UserMessage

Returns a new instance of UserMessage.



18
19
20
21
# File 'lib/claude_code_sdk/messages.rb', line 18

def initialize(id:, text:)
  super(id: id, type: "user")
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



16
17
18
# File 'lib/claude_code_sdk/messages.rb', line 16

def text
  @text
end