module BatchKit::Configurable

Adds a configure class method that can be used to load a configuration file and make it available to the class and instances of it.

Public Class Methods

included(base) click to toggle source

Used to extend the including class with the class methods defined in {ClassMethods}.

# File lib/batch-kit/configurable.rb, line 51
def self.included(base)
    base.extend(ClassMethods)
end

Public Instance Methods

config() click to toggle source

Each object instance gets its own copy of the class configuration, so that any modifications they make are local to the object instance.

@return [BatchKit::Config] a copy of the class configuration specific

to this instance.
# File lib/batch-kit/configurable.rb, line 61
def config
    @config ||= self.class.config.clone
end