Class: Twitter::Suggestion
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
Attributes inherited from Base
Instance Method Summary collapse
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/twitter/suggestion.rb', line 6 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
6 7 8 |
# File 'lib/twitter/suggestion.rb', line 6 def size @size end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
6 7 8 |
# File 'lib/twitter/suggestion.rb', line 6 def slug @slug end |
Instance Method Details
#==(other) ⇒ Boolean
10 11 12 |
# File 'lib/twitter/suggestion.rb', line 10 def ==(other) super || attr_equal(:slug, other) || attrs_equal(other) end |
#users ⇒ Array<Twitter::User>
15 16 17 18 19 |
# File 'lib/twitter/suggestion.rb', line 15 def users @users ||= Array(@attrs[:users]).map do |user| Twitter::User.fetch_or_new(user) end end |