Sha256: aad20dad7148789a9333e1e1bfd2dafa540de179a3143887379ca5a3b8c744b4
Contents?: true
Size: 222 Bytes
Versions: 5
Compression:
Stored size: 222 Bytes
Contents
module Stateful #:nodoc: module Listeners #:nodoc: def listeners @listeners ||= Hash.new { |h,k| h[k] = [] } end def fire(kind, *args) listeners[kind].each { |l| l[*args] } end end end
Version data entries
5 entries across 5 versions & 1 rubygems