class Morfo::Actions::Field

Attributes

actions[R]
field_path[R]

Public Class Methods

new(field_path, actions) click to toggle source
# File lib/morfo/actions.rb, line 7
def initialize field_path, actions
  @field_path = field_path
  @actions = actions
end

Public Instance Methods

calculated(&calculate_blk) click to toggle source
# File lib/morfo/actions.rb, line 18
def calculated &calculate_blk
  act = CalculationAction.new self, field_path, calculate_blk
  actions[field_path] = act
  act
end
execute(row) click to toggle source
# File lib/morfo/actions.rb, line 24
def execute row
  raise Morfo::NoSourceFieldError,
    "No field to get value from is specified for #{field_path.inspect}"
end
from(*from_field_path) click to toggle source
# File lib/morfo/actions.rb, line 12
def from *from_field_path
  act = FromAction.new self, from_field_path
  actions[field_path] = act
  act
end