Module: Collapsium::Config::ClassMethods

Included in:
Collapsium::Config
Defined in:
lib/collapsium-config.rb

Overview

Modules can have class methods, too, but it’s a little more verbose to provide them.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



53
54
55
# File 'lib/collapsium-config.rb', line 53

def config
  @config
end

Instance Method Details

#config_fileString

Returns the config file path, defaulting to ‘config/config.yml’.

Returns:

  • (String)

    the config file path, defaulting to ‘config/config.yml’



38
39
40
# File 'lib/collapsium-config.rb', line 38

def config_file
  return @config_file || DEFAULT_CONFIG_PATH
end

#config_file=(name) ⇒ Object

Set the configuration file



33
34
35
# File 'lib/collapsium-config.rb', line 33

def config_file=(name)
  @config_file = name
end

#config_optionsHash

Returns configuration loading options.

Returns:

  • (Hash)

    configuration loading options



48
49
50
# File 'lib/collapsium-config.rb', line 48

def config_options
  return @config_options || DEFAULT_CONFIG_OPTIONS
end

#config_options=(opts) ⇒ Object

Set configuration loading options



43
44
45
# File 'lib/collapsium-config.rb', line 43

def config_options=(opts)
  @config_options = opts
end