class Takwimu::Panel

Public Class Methods

new() click to toggle source
# File lib/takwimu/panel.rb, line 26
def initialize
  @instruments = []
end

Public Instance Methods

instrument(instrument) click to toggle source

Add an instrument to the Panel

# File lib/takwimu/panel.rb, line 31
def instrument(instrument)
  @instruments << instrument
end
instrument!(state, counter_readings, gauge_readings, timer_readings) click to toggle source

Read the values of each instrument into counter_readings, and gauge_readings. May have side effects on all arguments.

# File lib/takwimu/panel.rb, line 44
def instrument!(state, counter_readings, gauge_readings, timer_readings)
  @instruments.each do |ins|
    ins.instrument! state, counter_readings, gauge_readings, timer_readings
  end
end
start!(state) click to toggle source

Initialize the state of each instrument in the panel.

# File lib/takwimu/panel.rb, line 36
def start!(state)
  @instruments.each do |ins|
    ins.start! state if ins.respond_to?(:start!)
  end
end