Class: Twitter::GeoResults

Inherits:
Object
  • Object
show all
Includes:
Enumerable, Utils
Defined in:
lib/twitter/geo_results.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

flat_pmap, pmap

Methods included from Enumerable

#each

Constructor Details

#initialize(attrs = {}) ⇒ Twitter::GeoResults

Initializes a new GeoResults object



18
19
20
21
22
23
# File 'lib/twitter/geo_results.rb', line 18

def initialize(attrs = {})
  @attrs = attrs
  @collection = @attrs[:result].fetch(:places, []).collect do |place|
    Place.new(place)
  end
end

Instance Attribute Details

#attrsHash (readonly) Also known as: to_h



9
10
11
# File 'lib/twitter/geo_results.rb', line 9

def attrs
  @attrs
end

Instance Method Details

#tokenString



26
27
28
# File 'lib/twitter/geo_results.rb', line 26

def token
  @attrs[:token]
end