Class: Twitter::Action::Retweet

Inherits:
Tweet
  • Object
show all
Defined in:
lib/hackeroo/action/retweet.rb

Instance Attribute Summary

Attributes inherited from Tweet

#max_position, #min_position

Instance Method Summary collapse

Methods inherited from Tweet

#sources

Instance Method Details

#target_objectsArray<Twitter::Tweet>

A collection of retweets

Returns:

  • (Array<Twitter::Tweet>)


10
11
12
13
14
# File 'lib/hackeroo/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

#targetsArray<Twitter::User>

A collection containing the retweeted user

Returns:

  • (Array<Twitter::User>)


19
20
21
22
23
# File 'lib/hackeroo/action/retweet.rb', line 19

def targets
  @targets = Array(@attrs[:targets]).map do |user|
    Twitter::User.fetch_or_new(user)
  end
end