lib/deputy.rb in deputy-0.1.12 vs lib/deputy.rb in deputy-0.1.13
- old
+ new
@@ -43,10 +43,11 @@
[interval, plugin]
end.compact
end
def self.plugin_in_container(container)
- container.constants.map{|constant_name| container.const_get(constant_name)}.first
+ constants = container.constants.map{|constant_name| container.const_get(constant_name)}
+ constants.detect{|c| c.instance_methods.map{|m| m.to_s}.include?('build_report') }
end
end
module Deputy
START_MINUTE = (Time.now.to_i + 30) / 60 # we could start at 58..02 seconds -> always in middle of minute
\ No newline at end of file