Class: Twitter::Action::Mention
- Inherits:
-
Base
- Object
- Base
- Twitter::Action::Mention
- Includes:
- Creatable
- Defined in:
- lib/hackeroo/action/mention.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.
Instance Method Summary collapse
-
#source ⇒ Twitter::User
The user who mentioned a user.
-
#sources ⇒ Array<Twitter::User>
A collection of users who mentioned a user.
-
#target_objects ⇒ Array<Twitter::Tweet>
A collection of tweets that mention a user.
-
#targets ⇒ Array<Twitter::User>
A collection containing the mentioned user.
Instance Attribute Details
#max_position ⇒ Object (readonly)
Returns the value of attribute max_position.
8 9 10 |
# File 'lib/hackeroo/action/mention.rb', line 8 def max_position @max_position end |
#min_position ⇒ Object (readonly)
Returns the value of attribute min_position.
8 9 10 |
# File 'lib/hackeroo/action/mention.rb', line 8 def min_position @min_position end |
Instance Method Details
#source ⇒ Twitter::User
The user who mentioned a user
22 23 24 |
# File 'lib/hackeroo/action/mention.rb', line 22 def source @source = sources.first end |
#sources ⇒ Array<Twitter::User>
A collection of users who mentioned a user
13 14 15 16 17 |
# File 'lib/hackeroo/action/mention.rb', line 13 def sources @sources = Array(@attrs[:sources]).map do |user| Twitter::User.fetch_or_new(user) end end |
#target_objects ⇒ Array<Twitter::Tweet>
A collection of tweets that mention a user
29 30 31 32 33 |
# File 'lib/hackeroo/action/mention.rb', line 29 def target_objects @target_objects = Array(@attrs[:target_objects]).map do |tweet| Twitter::Tweet.fetch_or_new(tweet) end end |
#targets ⇒ Array<Twitter::User>
A collection containing the mentioned user
38 39 40 41 42 |
# File 'lib/hackeroo/action/mention.rb', line 38 def targets @targets = Array(@attrs[:targets]).map do |user| Twitter::User.fetch_or_new(user) end end |