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

Rename CONFIGURABLE to OPTIONS.

parent d6b65f61
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ module Geocoder
class Configuration
include Singleton
CONFIGURABLE = [
OPTIONS = [
:timeout,
:lookup,
:language,
......@@ -59,7 +59,7 @@ module Geocoder
:distances
]
attr_accessor *CONFIGURABLE
attr_accessor *OPTIONS
def initialize # :nodoc
set_defaults
......@@ -89,15 +89,15 @@ module Geocoder
# Delegates getters and setters for all configuration settings,
# and +set_defaults+ to the singleton instance.
instance_eval(CONFIGURABLE.map do |method|
meth = method.to_s
instance_eval(OPTIONS.map do |option|
o = option.to_s
<<-EOS
def #{meth}
instance.#{meth}
def #{o}
instance.#{o}
end
def #{meth}=(value)
instance.#{meth} = value
def #{o}=(value)
instance.#{o} = value
end
EOS
end.join("\n\n"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment