Sha256: 0cee8484c973bdc7b3a342f9e97b1fcaa36ef739e33abdede5286bd14d11c8bb

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

module PostalCoder
  module Config

    # If :tt_port is 0 then :tt_host should point to a Unix socket.
    @default_settings = {
      :gmaps_api_key => nil,
      :gmaps_api_timeout => 2,
      :tt_host => nil,
      :tt_port => 0,
      :no_raise_on_connection_fail => false,
      :accepted_formats => [:ca_postal_code, :us_zip_code] }

    def self.merge(overrides)
      @default_settings.merge(overrides)
    end

    def self.update(hsh)
      @default_settings.update(hsh)
    end

    def self.[](key)
      @default_settings[key]
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heycarsten-postalcoder-0.2.0 lib/postalcoder/config.rb