Class: Twitter::Suggestion

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

Instance Attribute Summary (collapse)

Attributes inherited from Base

#attrs

Instance Method Summary (collapse)

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, deprecate_attribute_method, display_uri_attr_reader, #initialize, object_attr_reader, predicate_attr_reader, uri_attr_reader

Methods included from Utils

flat_pmap, pmap

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Attribute Details

- (Object) name (readonly)

Returns the value of attribute name



7
8
9
# File 'lib/twitter/suggestion.rb', line 7

def name
  @name
end

- (Object) size (readonly)

Returns the value of attribute size



7
8
9
# File 'lib/twitter/suggestion.rb', line 7

def size
  @size
end

- (Object) slug (readonly)

Returns the value of attribute slug



7
8
9
# File 'lib/twitter/suggestion.rb', line 7

def slug
  @slug
end

Instance Method Details

- (Array<Twitter::User>) users



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

def users
  @attrs.fetch(:users, []).collect do |user|
    User.new(user)
  end
end