Class: SystemdMon::Formatters::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/systemd_mon/formatters/base.rb

Direct Known Subclasses

StateTableFormatter

Instance Method Summary collapse

Constructor Details

#initialize(unit) ⇒ Base

Returns a new instance of Base.



3
4
5
# File 'lib/systemd_mon/formatters/base.rb', line 3

def initialize(unit)
  self.unit = unit
end

Instance Method Details

#as_htmlObject



7
8
9
# File 'lib/systemd_mon/formatters/base.rb', line 7

def as_html
  raise "The formatter #{self.class} does not provide an html formatted string"
end

#as_textObject



11
12
13
# File 'lib/systemd_mon/formatters/base.rb', line 11

def as_text
  raise "The formatter #{self.class} does not provide a plain text string"
end