Class: Twitter::Action::Favorite
- Defined in:
- lib/twitter/action/favorite.rb
Instance Attribute Summary collapse
-
#target_objects ⇒ Object
readonly
Returns the value of attribute target_objects.
Attributes inherited from Tweet
Attributes inherited from Base
Instance Method Summary collapse
-
#targets ⇒ Array<Twitter::Tweet>
A collection containing the favorited tweet.
Methods inherited from Tweet
Methods included from Creatable
Methods inherited from Base
#[], attr_reader, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update
Constructor Details
This class inherits a constructor from Twitter::Base
Instance Attribute Details
#target_objects ⇒ Object (readonly)
Returns the value of attribute target_objects.
6 7 8 |
# File 'lib/twitter/action/favorite.rb', line 6 def target_objects @target_objects end |
Instance Method Details
#targets ⇒ Array<Twitter::Tweet>
A collection containing the favorited tweet
11 12 13 14 15 |
# File 'lib/twitter/action/favorite.rb', line 11 def targets @targets = Array(@attrs[:targets]).map do |tweet| Twitter::Tweet.fetch_or_new(tweet) end end |