Method: Geoloqi::Config#initialize
- Defined in:
- lib/geoloqi/config.rb
#initialize(opts = {}) ⇒ Config
Instantiate a new Geoloqi::Config object.
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/geoloqi/config.rb', line 80 def initialize(opts={}) self.use_hashie_mash ||= false self.throw_exceptions ||= true self.symbolize_names ||= true self.use_dynamic_exceptions ||= false opts.each {|k,v| send("#{k}=", v)} begin require 'hashie' if self.use_hashie_mash && !defined?(Hashie::Mash) rescue LoadError raise Error, "You've requested Hashie::Mash, but the gem is not available. Don't set use_hashie_mash in your config, or install the hashie gem" end end |