Module: BatchKit::Configurable
- Included in:
- Job
- Defined in:
- lib/batch-kit/configurable.rb
Overview
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.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
Used to extend the including class with the class methods defined in ClassMethods.
Instance Method Summary collapse
-
#config ⇒ BatchKit::Config
Each object instance gets its own copy of the class configuration, so that any modifications they make are local to the object instance.
Class Method Details
.included(base) ⇒ Object
Used to extend the including class with the class methods defined in ClassMethods.
51 52 53 |
# File 'lib/batch-kit/configurable.rb', line 51 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#config ⇒ BatchKit::Config
Each object instance gets its own copy of the class configuration, so that any modifications they make are local to the object instance.
61 62 63 |
# File 'lib/batch-kit/configurable.rb', line 61 def config @config ||= self.class.config.clone end |