Class: ArchivedAttributes::GlobalConfiguration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/archived_attributes/global_configuration.rb

Overview

Singleton class for reading the defaults archived attribute configuration for this environment.

Constant Summary collapse

DEFAULTS =
HashWithIndifferentAccess.new({
  :storage    => 'filesystem',
  :marshal    => false,
  :compress   => false,
  :s3 => {
    :protocol => 'https'
  },
  :filesystem => {
    :archive_root => nil
  }
})

Instance Method Summary collapse

Instance Method Details

#[](val) ⇒ Object



20
21
22
# File 'lib/archived_attributes/global_configuration.rb', line 20

def [](val)
  config[val]
end

#to_hashObject



24
25
26
# File 'lib/archived_attributes/global_configuration.rb', line 24

def to_hash
  config
end

#to_sObject



28
29
30
# File 'lib/archived_attributes/global_configuration.rb', line 28

def to_s
  config.inspect
end