Class: Kettle::Change
- Inherits:
-
Module
- Object
- Module
- Kettle::Change
- Defined in:
- lib/kettle/change.rb
Defined Under Namespace
Modules: ConstantChange
Instance Method Summary collapse
-
#included(base) ⇒ Object
-
#initialize(constants: nil, path: nil) ⇒ Change
constructor
A new instance of Change.
Constructor Details
#initialize(constants: nil, path: nil) ⇒ Change
Returns a new instance of Change.
3 4 5 6 7 |
# File 'lib/kettle/change.rb', line 3 def initialize(constants: nil, path: nil) super() @constants = Array(constants) if constants @path = path if path end |
Instance Method Details
#included(base) ⇒ Object
9 10 11 12 |
# File 'lib/kettle/change.rb', line 9 def included(base) constant_changer = ConstantChange.to_mod(constants: @constants, path: @path) base.send(:extend, constant_changer) end |