Sha256: fe3d6f7d92401610e1564115f3b2f8849b4c7ba9be0b8f3b2696f57602e8f8fd
Contents?: true
Size: 1.2 KB
Versions: 20
Compression:
Stored size: 1.2 KB
Contents
module MagicAddresses class Configuration OPTIONS = [] # Address Owners .. all models that use addresses (name + class_name => {users: "User", things: "Namespace::Thing"}) attr_accessor :address_owners # Enabled languages .. save address in each if different to default locale attr_accessor :active_locales # Addresses default locale attr_accessor :default_locale # Addresses default country attr_accessor :default_country # add default country in query ? attr_accessor :query_defaults # only save tranlations when differs from default? attr_accessor :uniq_translations # Job backend ( :sidekiq | :none ) attr_accessor :job_backend attr_accessor :earthdistance def initialize @address_owners = {} @active_locales = [:en, :de] @default_locale = :en @default_country = "Germany" @query_defaults = true @uniq_translations = false @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
20 entries across 20 versions & 1 rubygems