diff --git a/lib/geocoder.rb b/lib/geocoder.rb index 0882f15e3281c62d5438d96928eba7426cb0a036..18ca79480f79e6b51e6e76fface9cf6c7b77d483 100644 --- a/lib/geocoder.rb +++ b/lib/geocoder.rb @@ -10,17 +10,6 @@ require "geocoder/models/mongo_mapper" if defined?(::MongoMapper) module Geocoder 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. # diff --git a/lib/geocoder/configuration.rb b/lib/geocoder/configuration.rb index b0d4d6a5dc09e3737d7fddc266b7d8c3d3fb9fef..dfa46101bb1ce1a926419f5e6e22c485225d0333 100644 --- a/lib/geocoder/configuration.rb +++ b/lib/geocoder/configuration.rb @@ -2,6 +2,18 @@ require 'singleton' 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 # to change some functional aspects, like, the geocoding service provider, or # the units of calculations.