Class: Ethel::Operations::AddField

Inherits:
Ethel::Operation show all
Defined in:
lib/ethel/operations/add_field.rb

Instance Method Summary collapse

Methods inherited from Ethel::Operation

#transform

Constructor Details

#initialize(field) ⇒ AddField

Returns a new instance of AddField.



4
5
6
7
# File 'lib/ethel/operations/add_field.rb', line 4

def initialize(field)
  super
  @field = field
end

Instance Method Details

#before_transform(source, target) ⇒ Object



9
10
11
12
# File 'lib/ethel/operations/add_field.rb', line 9

def before_transform(source, target)
  super
  target.add_field(@field)
end