3 def self.attributes(sensors, attribute_names)
7 sensors.sort.each do |sensor, attributes|
9 results << "ignore #{sensor}"
11 results << "label #{sensor} \"#{attributes[:label]}\"" if attributes[:label]
12 results << "compute #{sensor} #{attributes[:compute]}" if attributes[:compute]
14 attribute_names.each do |name|
15 results << "set #{sensor}_#{name} #{attributes[name]}" if attributes[name]
20 results.map { |r| " #{r}\n" }.join("")