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