Class: Twitter::Action::Reply

Inherits:
Tweet show all
Defined in:
lib/twitter/action/reply.rb

Instance Attribute Summary

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 Method Details

#target_objectsArray<Twitter::Tweet>

A collection of tweets that reply to a user

Returns:



10
11
12
13
14
# File 'lib/twitter/action/reply.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::Tweet>

A collection that contains the replied-to tweets

Returns:



19
20
21
22
23
# File 'lib/twitter/action/reply.rb', line 19

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