Class: Twitter::Mention
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary (collapse)
-
- (Twitter::User) source
The user who mentioned a user.
-
- (Array<Twitter::User>) sources
A collection of users who mentioned a user.
-
- (Array<Twitter::Status>) target_objects
A collection of statuses that mention a user.
-
- (Array<Twitter::User>) targets
A collection containing the mentioned user.
Methods included from Creatable
Methods inherited from Base
#[], #initialize, lazy_attr_reader
Constructor Details
This class inherits a constructor from Twitter::Base
Instance Method Details
- (Twitter::User) source
The user who mentioned a user
20 21 22 |
# File 'lib/twitter/mention.rb', line 20 def source @source = sources.first end |
- (Array<Twitter::User>) sources
A collection of users who mentioned a user
11 12 13 14 15 |
# File 'lib/twitter/mention.rb', line 11 def sources @sources = Array(@attrs['sources']).map do |user| Twitter::User.new(user) end end |
- (Array<Twitter::Status>) target_objects
A collection of statuses that mention a user
27 28 29 30 31 |
# File 'lib/twitter/mention.rb', line 27 def target_objects @target_objects = Array(@attrs['target_objects']).map do |status| Twitter::Status.new(status) end end |
- (Array<Twitter::User>) targets
A collection containing the mentioned user
36 37 38 39 40 |
# File 'lib/twitter/mention.rb', line 36 def targets @targets = Array(@attrs['targets']).map do |user| Twitter::User.new(user) end end |