Class: SystemdMon::Formatters::Base
- Inherits:
-
Object
- Object
- SystemdMon::Formatters::Base
- Defined in:
- lib/systemd_mon/formatters/base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #as_html ⇒ Object
- #as_text ⇒ Object
-
#initialize(unit) ⇒ Base
constructor
A new instance of Base.
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_html ⇒ Object
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_text ⇒ Object
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 |