class SAAL::Charts
Public Class Methods
new(conffile=SAAL::CHARTSCONF, opts={})
click to toggle source
# File lib/charts.rb 5 def initialize(conffile=SAAL::CHARTSCONF, opts={}) 6 @defs = YAML::load(File.new(conffile)) 7 @sensors = opts[:sensors] || Sensors.new 8 @charts = {} 9 @defs.each do |name, defs| 10 @charts[name.to_sym] = Chart.new(name, defs, @sensors, opts) 11 end 12 end
Public Instance Methods
each() { |chart| ... }
click to toggle source
# File lib/charts.rb 19 def each 20 @charts.each{|name, chart| yield chart} 21 end
find(name)
click to toggle source
Fetch a specific chart by name
# File lib/charts.rb 15 def find(name) 16 @charts[name.to_sym] 17 end