Class: TryRuby::Message

Inherits:
Struct
  • Object
show all
Defined in:
lib/try_ruby/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Message

Returns a new instance of Message.



4
5
6
# File 'lib/try_ruby/message.rb', line 4

def initialize(attributes={})
  super(*attributes.values_at(*members.map(&:to_s)))
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



2
3
4
# File 'lib/try_ruby/message.rb', line 2

def body
  @body
end

#continueObject Also known as: continue?

Returns the value of attribute continue

Returns:

  • (Object)

    the current value of continue



2
3
4
# File 'lib/try_ruby/message.rb', line 2

def continue
  @continue
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



2
3
4
# File 'lib/try_ruby/message.rb', line 2

def title
  @title
end

Instance Method Details

#formattedObject



10
11
12
# File 'lib/try_ruby/message.rb', line 10

def formatted
  [title, body]
end