Sha256: c4158d6f8d7939e2d220542ab325e4af0187ef88e3d55ab5eab72c5e06be724e

Contents?: true

Size: 199 Bytes

Versions: 22

Compression:

Stored size: 199 Bytes

Contents

module Rules
	
	def add_rule(name,&block)
		@rules ||= {}
		@rules[name] = block
	end
	
	def run_rules(dat,rcv=nil,host=nil)
		@rules.map do |(name,rule)|
			rule.call(dat)
		end if @rules
	end
	
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
city-watch-0.7.9 lib/city_watch/util/rules.rb
city-watch-0.7.8 lib/city_watch/util/rules.rb
city-watch-0.7.7 lib/city_watch/util/rules.rb
city-watch-0.7.6 lib/city_watch/util/rules.rb
city-watch-0.7.5 lib/city_watch/util/rules.rb
city-watch-0.7.4 lib/city_watch/util/rules.rb
city-watch-0.7.3 lib/city_watch/util/rules.rb
city-watch-0.7.2 lib/city_watch/util/rules.rb
city-watch-0.7.1 lib/city_watch/util/rules.rb
city-watch-0.7.0 lib/city_watch/util/rules.rb
city-watch-0.6.9 lib/city_watch/util/rules.rb
city-watch-0.6.8 lib/city_watch/util/rules.rb
city-watch-0.6.7 lib/city_watch/util/rules.rb
city-watch-0.6.6 lib/city_watch/util/rules.rb
city-watch-0.6.5 lib/city_watch/util/rules.rb
city-watch-0.6.4 lib/city_watch/util/rules.rb
city-watch-0.6.3 lib/city_watch/util/rules.rb
city-watch-0.6.2 lib/city_watch/util/rules.rb
city-watch-0.6.1 lib/city_watch/util/rules.rb
city-watch-0.6.0 lib/city_watch/util/rules.rb