Class: Zeusd::Log::Line::Process

Inherits:
Base
  • Object
show all
Defined in:
lib/zeusd/log/line/process.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#ansi_color, #ansi_color_of, #connecting?, #crashed?, #done?, #loading?, #ready?, #running?, #status?, #waiting?

Class Method Details

.matches_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/zeusd/log/line/process.rb', line 7

def self.matches_line?(line)
  !!line[/(boot|─)/]
end

Instance Method Details

#idObject



11
12
13
# File 'lib/zeusd/log/line/process.rb', line 11

def id
  name
end

#nameObject



15
16
17
# File 'lib/zeusd/log/line/process.rb', line 15

def name
  self[/(\e\[[0-9]{1,2}m)([a-z_]+)/, 2]
end

#status_substringObject



19
20
21
# File 'lib/zeusd/log/line/process.rb', line 19

def status_substring
  name
end