Skip to content
Snippets Groups Projects
Commit 6f400578 authored by James McCarthy's avatar James McCarthy
Browse files

Removed use of eval in Geocoder::Models.


Signed-off-by: default avatarJames McCarthy <james2mccarthy@gmail.com>
parent 2b9aaae8
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ module Geocoder
unless @geocoder_options
@geocoder_options = {}
require "geocoder/stores/#{geocoder_file_name}"
include eval("Geocoder::Store::" + geocoder_module_name)
include Geocoder::Store.const_get(geocoder_module_name)
end
@geocoder_options.merge! options
end
......
......@@ -38,14 +38,14 @@ module Geocoder
unless geocoder_initialized?
@geocoder_options = {}
require "geocoder/stores/#{geocoder_file_name}"
include eval("Geocoder::Store::" + geocoder_module_name)
include Geocoder::Store.const_get(geocoder_module_name)
end
@geocoder_options.merge! options
end
def geocoder_initialized?
begin
included_modules.include? eval("Geocoder::Store::" + geocoder_module_name)
included_modules.include? Geocoder::Store.const_get(geocoder_module_name)
rescue NameError
false
end
......
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