module TypedOperation::Operations::Executable

def after_execute_operation(retval)

def after_execute_operation(retval)
  retval
end

def before_execute_operation

def before_execute_operation
  # noop
end

def call

def call
  execute_operation
end

def execute_operation

def execute_operation
  before_execute_operation
  retval = perform
  after_execute_operation(retval)
end

def perform

def perform
  raise InvalidOperationError, "Operation #{self.class} does not implement #perform"
end