Sha256: e43558cf6ef9b7444c2aaeb343aab2a89d1f104e065bab3780bda281c6baa93d

Contents?: true

Size: 777 Bytes

Versions: 1

Compression:

Stored size: 777 Bytes

Contents

module MagicAddresses
  class Configuration
    OPTIONS = []

    # Enabled languages .. save address in each if different to default locale
    attr_accessor :active_locales

    # Addresses default locale
    attr_accessor :default_locale

    attr_accessor :default_country

    # Job backend
    attr_accessor :job_backend

    attr_accessor :earthdistance
    attr_accessor :hstore

    def initialize
      @active_locales = [:en, :de]
      @default_locale = :en
      @default_country = "Germany"
      @job_backend = :none
      @earthdistance = false
      @hstore = false
    end

    # Returns a hash of all configurable options
    def to_hash
      OPTIONS.inject({}) do |hash, option|
        hash.merge(option.to_sym => send(option))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
magic_addresses-0.0.1 lib/magic_addresses/configuration.rb