Module: GeoMagic::RailsServiceAdapter

Includes:
ServiceAdapter
Defined in:
lib/rails/config.rb

Instance Attribute Summary

Attributes included from ServiceAdapter

#config, #geo_coder

Instance Method Summary collapse

Methods included from ServiceAdapter

#geocode, #reverse_geocode, services_available

Instance Method Details

#configure(file_name = 'map_api_keys.yml') ⇒ Object



13
14
15
16
# File 'lib/rails/config.rb', line 13

def configure file_name = 'map_api_keys.yml'
  @config ||= ::YAML.load_file("#{::Rails.root}/config/#{file_name}")[env]
  self
end

#envObject



7
8
9
10
11
# File 'lib/rails/config.rb', line 7

def env 
  heroku = ENV['HEROKU_SITE'] if ENV         
  rails_env = ::Rails.env.downcase if ::Rails.env
  heroku || rails_env || 'development'
end