Sha256: 2ed5e1fa3c20f00e5f3e8b54e44dc0020ff42e91681dcc891720578e905eadf9

Contents?: true

Size: 305 Bytes

Versions: 67

Compression:

Stored size: 305 Bytes

Contents

module RBS
  module Test
    module Observer
      @@observers = {}

      class <<self
        def notify(key, *args)
          @@observers[key]&.call(*args)
        end

        def register(key, object = nil, &block)
          @@observers[key] = object || block
        end
      end
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
rbs-1.0.3 lib/rbs/test/observer.rb
rbs-1.0.2 lib/rbs/test/observer.rb
rbs-1.0.1 lib/rbs/test/observer.rb
rbs-1.0.0 lib/rbs/test/observer.rb
rbs-1.0.0.pre2 lib/rbs/test/observer.rb
rbs-1.0.0.pre lib/rbs/test/observer.rb
rbs-0.20.1 lib/rbs/test/observer.rb
rbs-0.20.0 lib/rbs/test/observer.rb
rbs-0.19.0 lib/rbs/test/observer.rb
rbs-0.18.1 lib/rbs/test/observer.rb
rbs-0.18.0 lib/rbs/test/observer.rb
rbs-0.17.0 lib/rbs/test/observer.rb
rbs-0.16.0 lib/rbs/test/observer.rb
rbs-0.15.0 lib/rbs/test/observer.rb
rbs-0.14.0 lib/rbs/test/observer.rb
rbs-0.13.1 lib/rbs/test/observer.rb
rbs-0.13.0 lib/rbs/test/observer.rb
rbs-0.12.2 lib/rbs/test/observer.rb
rbs-0.12.1 lib/rbs/test/observer.rb
rbs-0.12.0 lib/rbs/test/observer.rb