Class: Builtins::BackgroundLog

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

Constant Summary

Constants inherited from Builtin

Builtin::BUILTIN_DIR

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



6
7
8
# File 'lib/builtins/background_log.rb', line 6

def description
	"displays the log from the current or most recent background task from this project"
end

Instance Method Details

#runObject



11
12
13
14
15
16
17
18
19
# File 'lib/builtins/background_log.rb', line 11

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