Class: Twitter::Action::Follow
- Includes:
- Creatable
- Defined in:
- lib/twitter/action/follow.rb
Instance Attribute Summary collapse
-
#max_position ⇒ Object
readonly
Returns the value of attribute max_position.
-
#min_position ⇒ Object
readonly
Returns the value of attribute min_position.
-
#target_objects ⇒ Object
readonly
Returns the value of attribute target_objects.
Attributes inherited from Base
Instance Method Summary collapse
-
#sources ⇒ Array<Twitter::User>
A collection of users who followed a user.
-
#targets ⇒ Array<Twitter::User>
A collection containing the followed user.
Methods included from Creatable
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 Attribute Details
#max_position ⇒ Object (readonly)
Returns the value of attribute max_position.
9 10 11 |
# File 'lib/twitter/action/follow.rb', line 9 def max_position @max_position end |
#min_position ⇒ Object (readonly)
Returns the value of attribute min_position.
9 10 11 |
# File 'lib/twitter/action/follow.rb', line 9 def min_position @min_position end |
#target_objects ⇒ Object (readonly)
Returns the value of attribute target_objects.
9 10 11 |
# File 'lib/twitter/action/follow.rb', line 9 def target_objects @target_objects end |
Instance Method Details
#sources ⇒ Array<Twitter::User>
A collection of users who followed a user
14 15 16 17 18 |
# File 'lib/twitter/action/follow.rb', line 14 def sources @sources = Array(@attrs[:sources]).map do |user| Twitter::User.fetch_or_new(user) end end |
#targets ⇒ Array<Twitter::User>
A collection containing the followed user
23 24 25 26 27 |
# File 'lib/twitter/action/follow.rb', line 23 def targets @targets = Array(@attrs[:targets]).map do |user| Twitter::User.fetch_or_new(user) end end |