Class: TryRuby::Message
- Inherits:
-
Struct
- Object
- Struct
- TryRuby::Message
- Defined in:
- lib/try_ruby/message.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#continue ⇒ Object
(also: #continue?)
Returns the value of attribute continue.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #formatted ⇒ Object
-
#initialize(attributes = {}) ⇒ Message
constructor
A new instance of Message.
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
#body ⇒ Object
Returns the value of attribute body
2 3 4 |
# File 'lib/try_ruby/message.rb', line 2 def body @body end |
#continue ⇒ Object Also known as: continue?
Returns the value of attribute continue
2 3 4 |
# File 'lib/try_ruby/message.rb', line 2 def continue @continue end |
#title ⇒ Object
Returns the value of attribute title
2 3 4 |
# File 'lib/try_ruby/message.rb', line 2 def title @title end |
Instance Method Details
#formatted ⇒ Object
10 11 12 |
# File 'lib/try_ruby/message.rb', line 10 def formatted [title, body] end |