Class: Metrics::Formatters::Base
- Inherits:
-
Object
- Object
- Metrics::Formatters::Base
- Defined in:
- lib/metrics/formatters/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#instrumenters ⇒ Object
readonly
Returns the value of attribute instrumenters.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*instrumenters) ⇒ Base
constructor
A new instance of Base.
- #lines ⇒ Object
- #write ⇒ Object
Constructor Details
#initialize(*instrumenters) ⇒ Base
Returns a new instance of Base.
9 10 11 |
# File 'lib/metrics/formatters/base.rb', line 9 def initialize(*instrumenters) @instrumenters = instrumenters.flatten end |
Instance Attribute Details
#instrumenters ⇒ Object (readonly)
Returns the value of attribute instrumenters.
3 4 5 |
# File 'lib/metrics/formatters/base.rb', line 3 def instrumenters @instrumenters end |
Class Method Details
.write(*instrumenters) ⇒ Object
5 6 7 |
# File 'lib/metrics/formatters/base.rb', line 5 def self.write(*instrumenters) new(*instrumenters).write end |
Instance Method Details
#lines ⇒ Object
20 21 22 |
# File 'lib/metrics/formatters/base.rb', line 20 def lines raise NotImplementedError end |
#write ⇒ Object
13 14 15 16 17 18 |
# File 'lib/metrics/formatters/base.rb', line 13 def write lines.each do |line| configuration.logger.info line end instrumenters end |