Class: Morfo::Actions::FromAction
- Inherits:
-
Object
- Object
- Morfo::Actions::FromAction
- Defined in:
- lib/morfo/actions.rb
Instance Method Summary collapse
- #execute(row) ⇒ Object
-
#initialize(field, from_field_path) ⇒ FromAction
constructor
A new instance of FromAction.
- #transformed(&blk) ⇒ Object
Constructor Details
#initialize(field, from_field_path) ⇒ FromAction
Returns a new instance of FromAction.
48 49 50 51 |
# File 'lib/morfo/actions.rb', line 48 def initialize field, from_field_path @field = field @from_field_path = from_field_path end |
Instance Method Details
#execute(row) ⇒ Object
59 60 61 |
# File 'lib/morfo/actions.rb', line 59 def execute row extract_value(from_field_path, row) end |
#transformed(&blk) ⇒ Object
53 54 55 56 57 |
# File 'lib/morfo/actions.rb', line 53 def transformed &blk act = TransformAction.new self, from_field_path, blk field.actions[field.field_path] = act act end |