Class: Twitter::Suggestion
- Includes:
- Memoizable
- Defined in:
- lib/twitter/suggestion.rb
Overview
Represents a Twitter user suggestion category
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
The slug of the suggestion category.
-
#size ⇒ Integer
readonly
The number of users in this category.
-
#slug ⇒ String
readonly
The slug of the suggestion category.
Attributes inherited from Base
Instance Method Summary collapse
-
#users ⇒ Array<Twitter::User>
Returns the users in this suggestion category.
Methods inherited from Base
#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, display_uri_attr_reader, #initialize, object_attr_reader, predicate_attr_reader, uri_attr_reader
Methods included from Utils
Constructor Details
This class inherits a constructor from Twitter::Base
Instance Attribute Details
#name ⇒ String (readonly)
The slug of the suggestion category
32 33 34 |
# File 'lib/twitter/suggestion.rb', line 32 def name @name end |
#size ⇒ Integer (readonly)
The number of users in this category
17 18 19 |
# File 'lib/twitter/suggestion.rb', line 17 def size @size end |
#slug ⇒ String (readonly)
The slug of the suggestion category
32 33 34 |
# File 'lib/twitter/suggestion.rb', line 32 def slug @slug end |
Instance Method Details
#users ⇒ Array<Twitter::User>
Returns the users in this suggestion category
40 41 42 43 44 |
# File 'lib/twitter/suggestion.rb', line 40 def users @attrs.fetch(:users, []).collect do |user| User.new(user) end end |