Skip to content
Snippets Groups Projects
Commit ca311eab authored by Alex Reisner's avatar Alex Reisner
Browse files

Move configure method to different file.

parent 7a9f85ca
Branches
Tags
No related merge requests found
...@@ -10,17 +10,6 @@ require "geocoder/models/mongo_mapper" if defined?(::MongoMapper) ...@@ -10,17 +10,6 @@ require "geocoder/models/mongo_mapper" if defined?(::MongoMapper)
module Geocoder module Geocoder
extend self extend self
# This method can be used to change some functional aspects, like,
# the geocoding service provider, or the units of calculations.
# Please see {include:Configuration}
def configure(&block)
if block_given?
module_eval(&block)
else
Configuration.instance
end
end
## ##
# Search for information about an address or a set of coordinates. # Search for information about an address or a set of coordinates.
# #
......
...@@ -2,6 +2,18 @@ require 'singleton' ...@@ -2,6 +2,18 @@ require 'singleton'
module Geocoder module Geocoder
##
# This method can be used to change some functional aspects, like,
# the geocoding service provider, or the units of calculations.
# Please see {include:Configuration}
def self.configure(&block)
if block_given?
module_eval(&block)
else
Configuration.instance
end
end
# This class handle the configuration process of Geocoder gem, and can be used # This class handle the configuration process of Geocoder gem, and can be used
# to change some functional aspects, like, the geocoding service provider, or # to change some functional aspects, like, the geocoding service provider, or
# the units of calculations. # the units of calculations.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment