Class: Twitter::Action::Retweet
- Defined in:
- lib/twitter/action/retweet.rb
Instance Attribute Summary
Attributes inherited from Tweet
Attributes inherited from Base
Instance Method Summary collapse
-
#target_objects ⇒ Array<Twitter::Tweet>
A collection of retweets.
-
#targets ⇒ Array<Twitter::User>
A collection containing the retweeted user.
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 Method Details
#target_objects ⇒ Array<Twitter::Tweet>
A collection of retweets
10 11 12 13 14 |
# File 'lib/twitter/action/retweet.rb', line 10 def target_objects @target_objects = Array(@attrs[:target_objects]).map do |tweet| Twitter::Tweet.fetch_or_new(tweet) end end |
#targets ⇒ Array<Twitter::User>
A collection containing the retweeted user
19 20 21 22 23 |
# File 'lib/twitter/action/retweet.rb', line 19 def targets @targets = Array(@attrs[:targets]).map do |user| Twitter::User.fetch_or_new(user) end end |