Class: Twitter::Retweet
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#sources ⇒ Array<Twitter::User>
A collection of users who retweeted a user.
-
#target_objects ⇒ Array<Twitter::Status>
A collection of retweets.
-
#targets ⇒ Array<Twitter::User>
A collection containing the retweeted 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
#sources ⇒ Array<Twitter::User>
A collection of users who retweeted a user
11 12 13 14 15 |
# File 'lib/twitter/retweet.rb', line 11 def sources @sources = Array(@attrs['sources']).map do |user| Twitter::User.new(user) end end |
#target_objects ⇒ Array<Twitter::Status>
A collection of retweets
20 21 22 23 24 |
# File 'lib/twitter/retweet.rb', line 20 def target_objects @target_objects = Array(@attrs['target_objects']).map do |status| Twitter::Status.new(status) end end |
#targets ⇒ Array<Twitter::User>
A collection containing the retweeted user
29 30 31 32 33 |
# File 'lib/twitter/retweet.rb', line 29 def targets @targets = Array(@attrs['targets']).map do |user| Twitter::User.new(user) end end |