Class: Tuiter::DirectMessage
- Inherits:
-
DirectMessageBasic
- Object
- DirectMessageBasic
- Tuiter::DirectMessage
- Defined in:
- lib/tuiter/data/direct_message.rb
Instance Attribute Summary collapse
-
#recipient ⇒ Object
Returns the value of attribute recipient.
-
#sender ⇒ Object
Returns the value of attribute sender.
Attributes inherited from DirectMessageBasic
#created_at, #id, #recipient_id, #recipient_screen_name, #sender_id, #sender_screen_name, #text
Instance Method Summary collapse
-
#initialize(data = nil) ⇒ DirectMessage
constructor
A new instance of DirectMessage.
Constructor Details
#initialize(data = nil) ⇒ DirectMessage
Returns a new instance of DirectMessage.
33 34 35 36 37 38 39 |
# File 'lib/tuiter/data/direct_message.rb', line 33 def initialize(data = nil) unless data.nil? super(data) @sender = User.new(data['sender']) @recipient = User.new(data['recipient']) end end |
Instance Attribute Details
#recipient ⇒ Object
Returns the value of attribute recipient.
31 32 33 |
# File 'lib/tuiter/data/direct_message.rb', line 31 def recipient @recipient end |
#sender ⇒ Object
Returns the value of attribute sender.
30 31 32 |
# File 'lib/tuiter/data/direct_message.rb', line 30 def sender @sender end |