Method: BatchKit::Events.dump_subscribers

Defined in:
lib/batch-kit/events.rb

.dump_subscribers(show_event = nil, log = @log) ⇒ Object

Dumps a list of events and their subscribers to the logger



135
136
137
138
139
140
141
142
143
144
# File 'lib/batch-kit/events.rb', line 135

def dump_subscribers(show_event = nil, log = @log)
    if log
        subscribers.each do |event, subs|
            if show_event.nil? || show_event == event
                log.info "Subscribers for event '#{event}':"
                subs.each{ |sub| log.detail sub.inspect }
            end
        end
    end
end