lib/configliere/config_file.rb
#
# we depend on you to require some sort of JSON
#
we depend on you to require some sort of JSON
we depend on you to require some sort of JSON
def read_json json_str, options={}
      require 'multi_json'
      new_data = MultiJson.load(json_str) || {}
      if options[:env]
        new_data = new_data[options[:env]] || {}
      end
      deep_merge! new_data
      self
    end
def read_json json_str , options = { } require 'multi_json' new_data = MultiJson . load ( json_str ) || { } if options [ :env ] new_data = new_data [ options [ :env ] ] || { } end deep_merge! new_data self end
we depend on you to require some sort of JSON
we depend on you to require some sort of JSON
# Extract the :env (production/development/etc)
json_str
options