Class: Builtins::BackgroundLog

Inherits:
Builtin
  • Object
show all
Defined in:
lib/builtins/background_log.rb

Instance Attribute Summary

Attributes inherited from Builtin

#args, #config

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Builtin

class_for, #initialize

Constructor Details

This class inherits a constructor from Builtin

Class Method Details

.descriptionObject



9
10
11
# 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

Instance Method Details

#runObject



14
15
16
17
18
19
20
21
22
# 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