Sha256: b13b3b0bd0f920fc4c8c63e7b140597a5c694d37ac5625c8859e6f21cf0eb29a

Contents?: true

Size: 336 Bytes

Versions: 52

Compression:

Stored size: 336 Bytes

Contents

# frozen_string_literal: true

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

52 entries across 52 versions & 2 rubygems

Version Path
rbs-3.4.0.pre.1 lib/rbs/test/observer.rb
rbs-3.3.2 lib/rbs/test/observer.rb
rbs-3.3.1 lib/rbs/test/observer.rb
rbs-3.3.0 lib/rbs/test/observer.rb
rbs-3.3.0.pre.2 lib/rbs/test/observer.rb
rbs-3.3.0.pre.1 lib/rbs/test/observer.rb
rbs-3.2.2 lib/rbs/test/observer.rb
rbs-3.2.1 lib/rbs/test/observer.rb
rbs-3.2.0 lib/rbs/test/observer.rb
rbs-3.2.0.pre.1 lib/rbs/test/observer.rb
rbs-3.1.3 lib/rbs/test/observer.rb
rbs-3.1.2 lib/rbs/test/observer.rb
rbs-3.1.1 lib/rbs/test/observer.rb
rbs-3.1.0 lib/rbs/test/observer.rb
rbs-3.0.4 lib/rbs/test/observer.rb
rbs-3.0.3 lib/rbs/test/observer.rb
rbs-3.0.2 lib/rbs/test/observer.rb
rbs-3.0.1 lib/rbs/test/observer.rb
rbs-3.0.0 lib/rbs/test/observer.rb
rbs-3.0.0.dev.3 lib/rbs/test/observer.rb