Sha256: f65deed95c6272b8917c8c5e49290eda3b0c7f0076e7cda8816266679ca4ae44

Contents?: true

Size: 610 Bytes

Versions: 19

Compression:

Stored size: 610 Bytes

Contents

require 'twitter/action/tweet'

module Twitter
  module Action
    class Retweet < Twitter::Action::Tweet

      # A collection of retweets
      #
      # @return [Array<Twitter::Tweet>]
      def target_objects
        @target_objects = Array(@attrs[:target_objects]).map do |tweet|
          Twitter::Tweet.fetch_or_new(tweet)
        end
      end

      # A collection containing the retweeted user
      #
      # @return [Array<Twitter::User>]
      def targets
        @targets = Array(@attrs[:targets]).map do |user|
          Twitter::User.fetch_or_new(user)
        end
      end

    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
twitter-4.8.1 lib/twitter/action/retweet.rb
twitter-4.8.0 lib/twitter/action/retweet.rb
hackeroo-0.1.0 lib/hackeroo/action/retweet.rb
twitter-4.7.0 lib/twitter/action/retweet.rb
twitter-4.6.2 lib/twitter/action/retweet.rb
twitter-4.6.1 lib/twitter/action/retweet.rb
twitter-4.6.0 lib/twitter/action/retweet.rb
twitter-4.5.0 lib/twitter/action/retweet.rb
twitter-4.4.4 lib/twitter/action/retweet.rb
twitter-4.4.3 lib/twitter/action/retweet.rb
twitter-4.4.2 lib/twitter/action/retweet.rb
twitter-4.4.1 lib/twitter/action/retweet.rb
twitter-4.4.0 lib/twitter/action/retweet.rb
twitter-4.3.0 lib/twitter/action/retweet.rb
twitter-4.2.0 lib/twitter/action/retweet.rb
twitter-4.1.2 lib/twitter/action/retweet.rb
twitter-4.1.1 lib/twitter/action/retweet.rb
twitter-4.1.0 lib/twitter/action/retweet.rb
twitter-4.0.0 lib/twitter/action/retweet.rb