class Maintainer::CDInst
Public Class Methods
new(path, msg_success, msg_error, should_crash)
click to toggle source
# File lib/maintainer_core/instructions.rb, line 317 def initialize(path, msg_success, msg_error, should_crash) @path = path @msg_success = msg_success @msg_error = msg_error @should_crash = should_crash end
Public Instance Methods
crash_on_error!()
click to toggle source
# File lib/maintainer_core/instructions.rb, line 329 def crash_on_error!() return false end
error_message!()
click to toggle source
# File lib/maintainer_core/instructions.rb, line 340 def error_message!() if not @msg_error or @msg_error.empty? return "[Error moving to] #{@path}" end return "#{@msg_error}" end
run!()
click to toggle source
# File lib/maintainer_core/instructions.rb, line 324 def run!() Dir.chdir "#{@path}" return true end
success_message!()
click to toggle source
# File lib/maintainer_core/instructions.rb, line 333 def success_message!() if not @msg_success or @msg_success.empty? return "[Successfully moved to] #{@path}" end return "#{@msg_success}" end