Class: Arcp::Job::EventBody::Thought

Inherits:
Data
  • Object
show all
Defined in:
lib/arcp/job/event_body/thought.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



6
7
8
# File 'lib/arcp/job/event_body/thought.rb', line 6

def text
  @text
end

Class Method Details

.from_h(h) ⇒ Object



7
# File 'lib/arcp/job/event_body/thought.rb', line 7

def self.from_h(h) = new(text: h.transform_keys(&:to_s).fetch('text'))

Instance Method Details

#to_hObject



8
# File 'lib/arcp/job/event_body/thought.rb', line 8

def to_h = { 'text' => text }