Class: GeoLocator
- Inherits:
-
Object
- Object
- GeoLocator
- Defined in:
- lib/geo_locator.rb,
lib/geo_locator/version.rb
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ GeoLocator
constructor
A new instance of GeoLocator.
- #locate(options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ GeoLocator
Returns a new instance of GeoLocator.
41 42 43 44 |
# File 'lib/geo_locator.rb', line 41 def initialize( = {}) @db = SQLite3::Database.open(File.("../geo_locator.sqlite3", File.dirname(__FILE__))) @format = [:format] || ["format"] || :hash end |
Class Method Details
.locate(options = {}) ⇒ Object
37 38 39 |
# File 'lib/geo_locator.rb', line 37 def self.locate( = {}) self.new.locate() end |
Instance Method Details
#locate(options = {}) ⇒ Object
46 47 48 49 50 51 |
# File 'lib/geo_locator.rb', line 46 def locate( = {}) [:db] = @db [:format] = [:format] || ["format"] || @format self.class.send(:_locate, ) end |