Class: Factual::Query::Geocode

Inherits:
Base
  • Object
show all
Defined in:
lib/factual/query/geocode.rb

Instance Attribute Summary

Attributes inherited from Base

#action, #params, #path

Instance Method Summary collapse

Methods inherited from Base

#[], #each, #full_path, #last, #populate, #rows, #schema, #total_count

Constructor Details

#initialize(api, lat, lng) ⇒ Geocode

Returns a new instance of Geocode.



6
7
8
9
10
11
12
# File 'lib/factual/query/geocode.rb', line 6

def initialize(api, lat, lng)
  @path = "places/geocode"
  @action = :read
  @params = {:geo => {"$point" => [lat, lng]}}

  super(api, @params)
end