Sha256: 90124e7fcdd6dbcdab49fa1fe2148ce2c044d8cd721e20b5439993b39a2d631f
Contents?: true
Size: 694 Bytes
Versions: 70
Compression:
Stored size: 694 Bytes
Contents
module Redcar class Application class EventSpewer attr_accessor :within def initialize @within = {} end def ignore?(name, *args) !!@within[[name, args]] end def ignore(name, *args) @within[[name, args]] = true begin yield ensure @within.delete([name, args]) end end def create(name, *args) Redcar.plugin_manager.objects_implementing(:application_event_handler).each do |object| handler = object.application_event_handler handler.send(name, *args) if handler.respond_to?(name) end end end end end
Version data entries
70 entries across 70 versions & 2 rubygems