Class: Userstream::DirectMessage
- Inherits:
-
TwitterObject
- Object
- TwitterObject
- Userstream::DirectMessage
- Defined in:
- lib/userstream/event/direct_message.rb
Constant Summary collapse
- ATTRS =
[:coordinates, :recipient, :sender, :sender_screen_name, :text, :id, :recipient_id, :sender_id]
Constants inherited from TwitterObject
TwitterObject::SINGLE_TWEET_URL, TwitterObject::SINGLE_USER_URL
Instance Attribute Summary
Attributes inherited from TwitterObject
Instance Method Summary collapse
-
#initialize(base, data = nil) {|_self| ... } ⇒ DirectMessage
constructor
A new instance of DirectMessage.
- #loaded? ⇒ Boolean
- #tweet_loadable_id ⇒ Object
Methods inherited from TwitterObject
attrs, #from_json, #get_tweet_data, #get_user_data, #load_all, #load_tweet_data, #load_user_data, tweet_writer, user_writer
Constructor Details
#initialize(base, data = nil) {|_self| ... } ⇒ DirectMessage
Returns a new instance of DirectMessage.
10 11 12 13 14 |
# File 'lib/userstream/event/direct_message.rb', line 10 def initialize(base, data = nil) @base = base from_json(data['direct_message']) if data and data['direct_message'] yield self if block_given? end |
Instance Method Details
#loaded? ⇒ Boolean
20 21 22 |
# File 'lib/userstream/event/direct_message.rb', line 20 def loaded? !text.nil? end |
#tweet_loadable_id ⇒ Object
16 17 18 |
# File 'lib/userstream/event/direct_message.rb', line 16 def tweet_loadable_id id end |