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.7.0.beta.3 lib/rbs/test/observer.rb
rbs-1.7.0.beta.2 lib/rbs/test/observer.rb
rbs-1.7.0.beta.1 lib/rbs/test/observer.rb
rbs-1.6.2 lib/rbs/test/observer.rb
rbs-1.6.1 lib/rbs/test/observer.rb
rbs-1.6.0 lib/rbs/test/observer.rb
rbs-1.5.1 lib/rbs/test/observer.rb
rbs-1.5.0 lib/rbs/test/observer.rb
rbs-1.4.0 lib/rbs/test/observer.rb
rbs-1.3.3 lib/rbs/test/observer.rb
rbs-1.3.2 lib/rbs/test/observer.rb
rbs-1.3.1 lib/rbs/test/observer.rb
rbs-1.3.0 lib/rbs/test/observer.rb
rbs-1.2.1 lib/rbs/test/observer.rb
rbs-1.2.0 lib/rbs/test/observer.rb
rbs-1.1.1 lib/rbs/test/observer.rb
rbs-1.1.0 lib/rbs/test/observer.rb
rbs-1.0.6 lib/rbs/test/observer.rb
rbs-1.0.5 lib/rbs/test/observer.rb
rbs-1.0.4 lib/rbs/test/observer.rb