Class: Messed::Message
- Inherits:
-
Object
- Object
- Messed::Message
- Includes:
- Hashify, Hashify::Json
- Defined in:
- lib/messed/message.rb,
lib/messed/message/twitter.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Twitter
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#enqueued_at ⇒ Object
Returns the value of attribute enqueued_at.
-
#from ⇒ Object
Returns the value of attribute from.
-
#in_reply_to ⇒ Object
Returns the value of attribute in_reply_to.
-
#to ⇒ Object
Returns the value of attribute to.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(body = nil) {|_self| ... } ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(body = nil) {|_self| ... } ⇒ Message
Returns a new instance of Message.
29 30 31 32 |
# File 'lib/messed/message.rb', line 29 def initialize(body = nil) self.body = body yield self if block_given? end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
10 11 12 |
# File 'lib/messed/message.rb', line 10 def body @body end |
#enqueued_at ⇒ Object
Returns the value of attribute enqueued_at.
13 14 15 |
# File 'lib/messed/message.rb', line 13 def enqueued_at @enqueued_at end |
#from ⇒ Object
Returns the value of attribute from.
11 12 13 |
# File 'lib/messed/message.rb', line 11 def from @from end |
#in_reply_to ⇒ Object
Returns the value of attribute in_reply_to.
14 15 16 |
# File 'lib/messed/message.rb', line 14 def in_reply_to @in_reply_to end |
#to ⇒ Object
Returns the value of attribute to.
12 13 14 |
# File 'lib/messed/message.rb', line 12 def to @to end |
Class Method Details
.class_for_type(type) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/messed/message.rb', line 20 def self.class_for_type(type) case type when :twitter Twitter else raise type end end |