Class: Twitter::Action::Follow
- Inherits:
-
Base
- Object
- Base
- Twitter::Action::Follow
- Includes:
- Creatable
- Defined in:
- lib/twitter/action/follow.rb
Instance Attribute Summary (collapse)
-
- (Object) max_position
readonly
Returns the value of attribute max_position.
-
- (Object) min_position
readonly
Returns the value of attribute min_position.
-
- (Object) target_objects
readonly
Returns the value of attribute target_objects.
Instance Method Summary (collapse)
-
- (Array<Twitter::User>) sources
A collection of users who followed a user.
-
- (Array<Twitter::User>) targets
A collection containing the followed user.
Methods included from Creatable
Methods inherited from Base
#[], #attr_equal, attr_reader, #attrs, #attrs_equal, fetch, fetch_or_new, from_response, identity_map, #initialize, store, #update
Constructor Details
This class inherits a constructor from Twitter::Base
Instance Attribute Details
- (Object) max_position (readonly)
Returns the value of attribute max_position
8 9 10 |
# File 'lib/twitter/action/follow.rb', line 8 def max_position @max_position end |
- (Object) min_position (readonly)
Returns the value of attribute min_position
8 9 10 |
# File 'lib/twitter/action/follow.rb', line 8 def min_position @min_position end |
- (Object) target_objects (readonly)
Returns the value of attribute target_objects
8 9 10 |
# File 'lib/twitter/action/follow.rb', line 8 def target_objects @target_objects end |
Instance Method Details
- (Array<Twitter::User>) sources
A collection of users who followed a user
13 14 15 16 17 |
# File 'lib/twitter/action/follow.rb', line 13 def sources @sources = Array(@attrs[:sources]).map do |user| Twitter::User.fetch_or_new(user) end end |
- (Array<Twitter::User>) targets
A collection containing the followed user
22 23 24 25 26 |
# File 'lib/twitter/action/follow.rb', line 22 def targets @targets = Array(@attrs[:targets]).map do |user| Twitter::User.fetch_or_new(user) end end |