class Terminal
Nested
Definitions
CONSOLE_START_AT = "CONSOLE_START_AT"
This, and all related methods, is considered private.
def self.start_at!(environment = ENV)
Exports CONSOLE_START which can be used to synchronize the start times of all child processes when they log using delta time.
Implementation
def self.start_at!(environment = ENV)
if time_string = environment[CONSOLE_START_AT]
start_at = Time.parse(time_string) rescue nil
end
unless start_at
start_at = Time.now
environment[CONSOLE_START_AT] = start_at.to_s
end
return start_at
end
def last_output
This a final output that then writes to an IO object.
Implementation
def last_output
self
end