Class: Kettle::Change

Inherits:
Module
  • Object
show all
Defined in:
lib/kettle/change.rb

Defined Under Namespace

Modules: ConstantChange

Instance Method Summary collapse

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