internal method called by executor
# File lib/foreman_maintain/check.rb, line 32 def __run__(execution) super rescue Error::Fail => e fail!(e.message) rescue Error::Warn => e warn!(e.message) end
run condition and mark the check as failed when not passing
+:next_steps* - one or more procedures that can be followed to address
the failure, will be offered to the user when running in interactive mode
# File lib/foreman_maintain/check.rb, line 17 def assert(condition, error_message, options = {}) options = options.validate_options!(:next_steps) unless condition next_steps = Array(options.fetch(:next_steps, [])) self.next_steps.concat(next_steps) raise Error::Fail, error_message end end
public method to be overriden
# File lib/foreman_maintain/check.rb, line 27 def run raise NotImplementedError end