Sha256: 83daa85c4a151d4cc2ea52e11d0a57a7c54dda393972ca199fde0a828d42129c
Contents?: true
Size: 722 Bytes
Versions: 3
Compression:
Stored size: 722 Bytes
Contents
module Watchmen def self.test @watchmen.each do |cmd| puts "Running #{cmd.name}:" puts cmd.data puts "Done." end end def self.data @watchmen.inject({}) do |acc,cmd| acc[cmd.name] = cmd.data acc end end def self.register(cls) @watchmen ||= [] @watchmen << cls end def self.get(name) @watchmen.select {|w| w.name.to_s == name.to_s }.first end def self.each @watchmen.each do |w| yield w end end end require 'city_watch/util/watchman' require 'city_watch/watchmen/sysinfo' require 'city_watch/watchmen/unicorns' require 'city_watch/watchmen/nginx' require 'city_watch/watchmen/cpu_usage' require 'city_watch/watchmen/disk_usage' require 'city_watch/watchmen/uptime'
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
city-watch-0.5.8 | lib/city_watch/watchmen.rb |
city-watch-0.5.7 | lib/city_watch/watchmen.rb |
city-watch-0.5.6 | lib/city_watch/watchmen.rb |