Sha256: 3e8b5de62de227f524c63534b5986e8c20391310c0517cc1d1033688adbb058f

Contents?: true

Size: 729 Bytes

Versions: 11

Compression:

Stored size: 729 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

    def initialize
      @active_locales = [:en, :de]
      @default_locale = :en
      @default_country = "Germany"
      @job_backend = :none
      @earthdistance = 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

11 entries across 11 versions & 1 rubygems

Version Path
magic_addresses-0.0.12 lib/magic_addresses/configuration.rb
magic_addresses-0.0.11 lib/magic_addresses/configuration.rb
magic_addresses-0.0.10 lib/magic_addresses/configuration.rb
magic_addresses-0.0.9 lib/magic_addresses/configuration.rb
magic_addresses-0.0.8 lib/magic_addresses/configuration.rb
magic_addresses-0.0.7 lib/magic_addresses/configuration.rb
magic_addresses-0.0.6 lib/magic_addresses/configuration.rb
magic_addresses-0.0.5 lib/magic_addresses/configuration.rb
magic_addresses-0.0.4 lib/magic_addresses/configuration.rb
magic_addresses-0.0.3 lib/magic_addresses/configuration.rb
magic_addresses-0.0.2 lib/magic_addresses/configuration.rb