Class: Twitter::Follow

Inherits:
Action show all
Defined in:
lib/twitter/follow.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods included from Creatable

#created_at

Methods inherited from Base

#[], #initialize, lazy_attr_reader

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Method Details

#sourcesArray<Twitter::User>

A collection of users who followed a user

Returns:


11
12
13
14
15
# File 'lib/twitter/follow.rb', line 11

def sources
  @sources = Array(@attrs['sources']).map do |user|
    Twitter::User.new(user)
  end
end

#targetsArray<Twitter::User>

A collection containing the followed user

Returns:


20
21
22
23
24
# File 'lib/twitter/follow.rb', line 20

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