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

Parameters:

  • attrs (Hash) (defaults to: {})


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

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

Returns:

  • (Hash)


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

def attrs
  @attrs
end

Instance Method Details

#tokenString

Returns:

  • (String)


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

def token
  @attrs[:token]
end