Class: Twitter::Favorite
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#sources ⇒ Array<Twitter::User>
A collection of users who favorited a status.
-
#targets ⇒ Array<Twitter::Status>
A collection containing the favorited status.
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
#sources ⇒ Array<Twitter::User>
A collection of users who favorited a status
12 13 14 15 16 |
# File 'lib/twitter/favorite.rb', line 12 def sources @sources = Array(@attrs['sources']).map do |user| Twitter::User.new(user) end end |
#targets ⇒ Array<Twitter::Status>
A collection containing the favorited status
21 22 23 24 25 |
# File 'lib/twitter/favorite.rb', line 21 def targets @targets = Array(@attrs['targets']).map do |status| Twitter::Status.new(status) end end |