Class: Twitter::Suggestion

Inherits:
Base
  • Object
show all
Defined in:
lib/twitter/suggestion.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], #initialize, lazy_attr_reader

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

  • other (Twiter::Suggestion)

Returns:

  • (Boolean)


10
11
12
# File 'lib/twitter/suggestion.rb', line 10

def ==(other)
  super || (other.class == self.class && other.slug == self.slug)
end

#usersArray<Twitter::User>

Returns:



15
16
17
18
19
# File 'lib/twitter/suggestion.rb', line 15

def users
  @users = Array(@attrs['users']).map do |user|
    Twitter::User.new(user)
  end
end