lib/deputy.rb in deputy-0.1.10 vs lib/deputy.rb in deputy-0.1.11
- old
+ new
@@ -9,18 +9,20 @@
new.map{|const| const_get(const) }
end
class Scout
class Plugin
+ OPTIONS = {}.to_yaml
+
def report(metrics)
metrics.each do |key, value|
Deputy.send_report "#{self.class.to_s.split('::')[1..-1]}.#{key}", value
end
end
# stub options for now...
- def option(*args)
- nil
+ def option(key)
+ (YAML.load(self.class::OPTIONS)[key.to_s]||{})['default']
end
end
def self.plugins(code)
eval_and_fetch_constants(code).map do |container|
\ No newline at end of file