module ActiveDuty::Run

Public Instance Methods

call(*args) click to toggle source
# File lib/active_duty/run.rb, line 7
def call(*args)
  begin
    call!(*args)
  rescue => error
    rollback!
    if error.is_a?(Failure)
      self.errors.add(:base, error.message)
      return self
    end
    raise error
  end
  self
end
call!(*args) click to toggle source
# File lib/active_duty/run.rb, line 21
def call!(*args)
  run(*args)
  called!(self)
  deploy_troops!
  self
end
run() click to toggle source
# File lib/active_duty/run.rb, line 5
def run; end