module ObServ::DSL
Public Instance Methods
publish(event, *args)
click to toggle source
# File lib/ob_serv.rb, line 10 def publish(event, *args) # ObServ.publish event, *args ObServ.config[:publish].call(event, *args) end
subscribe(event, options = {})
click to toggle source
# File lib/ob_serv.rb, line 4 def subscribe(event, options = {}) options[:on] = event unless options.include?(:on) return ObServ.register self, event, options, &Proc.new if block_given? ObServ.register self, event, options end