Class: Messed::Message

Inherits:
Object
  • Object
show all
Includes:
Hashify, Hashify::Json
Defined in:
lib/messed/message.rb,
lib/messed/message/twitter.rb

Direct Known Subclasses

Twitter

Defined Under Namespace

Classes: Twitter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body = nil) {|_self| ... } ⇒ Message

Returns a new instance of Message.

Yields:

  • (_self)

Yield Parameters:



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

#bodyObject

Returns the value of attribute body.



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

def body
  @body
end

#enqueued_atObject

Returns the value of attribute enqueued_at.



13
14
15
# File 'lib/messed/message.rb', line 13

def enqueued_at
  @enqueued_at
end

#fromObject

Returns the value of attribute from.



11
12
13
# File 'lib/messed/message.rb', line 11

def from
  @from
end

#in_reply_toObject

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

#toObject

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