Class: Twitter::Action::Favorite

Inherits:
Tweet
  • Object
show all
Defined in:
lib/twitter/action/favorite.rb

Instance Attribute Summary collapse

Attributes inherited from Tweet

#max_position, #min_position

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Tweet

#sources

Methods included from Creatable

#created_at

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_objectsObject (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

#targetsArray<Twitter::Tweet>

A collection containing the favorited tweet

Returns:



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