Sha256: f220ab811d1520af1ba9cc93861b3a5847f255de456881b39590920c2d4a6e69
Contents?: true
Size: 693 Bytes
Versions: 3
Compression:
Stored size: 693 Bytes
Contents
module Barnes class Panel def initialize @instruments = [] end # Add an instrument to the Panel def instrument(instrument) @instruments << instrument end # Initialize the state of each instrument in the panel. def start!(state) @instruments.each do |ins| ins.start! state if ins.respond_to?(:start!) end end # Read the values of each instrument into counter_readings, # and gauge_readings. May have side effects on all arguments. def instrument!(state, counter_readings, gauge_readings) @instruments.each do |ins| ins.instrument! state, counter_readings, gauge_readings end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
barnes-0.0.3 | lib/barnes/panel.rb |
barnes-0.0.2 | /Users/schneems/Documents/projects/barnes/lib/barnes/panel.rb |
barnes-0.0.1 | /Users/schneems/Documents/projects/barnes/lib/barnes/panel.rb |