Sha256: a52342bdafeaa48a77fd0b93faf880ff7326005fe1a730c15710f7dc493b333e

Contents?: true

Size: 708 Bytes

Versions: 12

Compression:

Stored size: 708 Bytes

Contents

require 'twitter/base'
require 'twitter/creatable'

module Twitter
  module Action
    class Follow < Twitter::Base
      include Twitter::Creatable
      attr_reader :max_position, :min_position, :target_objects

      # A collection of users who followed a user
      #
      # @return [Array<Twitter::User>]
      def sources
        @sources = Array(@attrs[:sources]).map do |user|
          Twitter::User.fetch_or_new(user)
        end
      end

      # A collection containing the followed 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

12 entries across 12 versions & 2 rubygems

Version Path
twitter-4.8.1 lib/twitter/action/follow.rb
twitter-4.8.0 lib/twitter/action/follow.rb
hackeroo-0.1.0 lib/hackeroo/action/follow.rb
twitter-4.7.0 lib/twitter/action/follow.rb
twitter-4.6.2 lib/twitter/action/follow.rb
twitter-4.6.1 lib/twitter/action/follow.rb
twitter-4.6.0 lib/twitter/action/follow.rb
twitter-4.5.0 lib/twitter/action/follow.rb
twitter-4.4.4 lib/twitter/action/follow.rb
twitter-4.4.3 lib/twitter/action/follow.rb
twitter-4.4.2 lib/twitter/action/follow.rb
twitter-4.4.1 lib/twitter/action/follow.rb