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

- (Twitter::GeoResults) initialize(attrs = {})

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

- (Object) attrs (readonly) Also known as: to_h

Returns the value of attribute attrs



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

def attrs
  @attrs
end

Instance Method Details

- (String) token

Returns:

  • (String)


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

def token
  @attrs[:token]
end