Class: Metrician::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/metrician/reporter.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.reportersObject (readonly)

Returns the value of attribute reporters.



12
13
14
# File 'lib/metrician/reporter.rb', line 12

def reporters
  @reporters
end

Class Method Details

.allObject



6
7
8
# File 'lib/metrician/reporter.rb', line 6

def self.all
  reporters.select(&:enabled?).map(&:new)
end

.enabled?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/metrician/reporter.rb', line 21

def self.enabled?
  false
end

.inherited(subclass) ⇒ Object



16
17
18
19
# File 'lib/metrician/reporter.rb', line 16

def self.inherited(subclass)
  @reporters ||= Set.new
  @reporters << subclass
end

Instance Method Details

#instrumentObject



25
26
27
# File 'lib/metrician/reporter.rb', line 25

def instrument
  nil
end