Class: Bh::Message
- Inherits:
-
Data
- Object
- Data
- Bh::Message
- Defined in:
- lib/bh/message.rb
Overview
One message of a chat, as chat_with draws it: which side its bubble is on (:left
for the other party, :right for the reader), its text, the photos it carries as
a list of addresses, who the sender was, when it was said (at), how its delivery
went (:delivered, :sent, :failed, :undelivered or nil) and what it cost in
dollars, where anything did. Any object answering the same seven is a message too;
this is for a host that has the facts and no model to hang them on. A message with
neither words nor pictures yet is drawn as being typed.
Instance Attribute Summary collapse
-
#at ⇒ Object
readonly
Returns the value of attribute at.
-
#cost ⇒ Object
readonly
Returns the value of attribute cost.
-
#delivery ⇒ Object
readonly
Returns the value of attribute delivery.
-
#photos ⇒ Object
readonly
Returns the value of attribute photos.
-
#sender ⇒ Object
readonly
Returns the value of attribute sender.
-
#side ⇒ Object
readonly
Returns the value of attribute side.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(side:, text: nil, photos: [], sender: nil, at: nil, delivery: nil, cost: nil) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(side:, text: nil, photos: [], sender: nil, at: nil, delivery: nil, cost: nil) ⇒ Message
Returns a new instance of Message.
10 11 12 |
# File 'lib/bh/message.rb', line 10 def initialize(side:, text: nil, photos: [], sender: nil, at: nil, delivery: nil, cost: nil) super end |
Instance Attribute Details
#at ⇒ Object (readonly)
Returns the value of attribute at
9 10 11 |
# File 'lib/bh/message.rb', line 9 def at @at end |
#cost ⇒ Object (readonly)
Returns the value of attribute cost
9 10 11 |
# File 'lib/bh/message.rb', line 9 def cost @cost end |
#delivery ⇒ Object (readonly)
Returns the value of attribute delivery
9 10 11 |
# File 'lib/bh/message.rb', line 9 def delivery @delivery end |
#photos ⇒ Object (readonly)
Returns the value of attribute photos
9 10 11 |
# File 'lib/bh/message.rb', line 9 def photos @photos end |
#sender ⇒ Object (readonly)
Returns the value of attribute sender
9 10 11 |
# File 'lib/bh/message.rb', line 9 def sender @sender end |
#side ⇒ Object (readonly)
Returns the value of attribute side
9 10 11 |
# File 'lib/bh/message.rb', line 9 def side @side end |
#text ⇒ Object (readonly)
Returns the value of attribute text
9 10 11 |
# File 'lib/bh/message.rb', line 9 def text @text end |