class Builtins::BackgroundLog
Public Class Methods
description()
click to toggle source
# File lib/builtins/background_log.rb, line 9 def description "displays the log from the current or most recent background task from this project" end
Public Instance Methods
run()
click to toggle source
# File lib/builtins/background_log.rb, line 14 def run unless File.exist?(Background.log_filename) Output.warn("No background log found at '#{Background.log_filename}'.") return 0 end Output.notice("Displaying background log '#{Background.log_filename}'...") display_file end
Private Instance Methods
display_file()
click to toggle source
# File lib/builtins/background_log.rb, line 26 def display_file if args.any? exec("tail #{args.join(' ')} '#{Background.log_filename}'") else exec("cat '#{Background.log_filename}'") end end