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.0.0.dev.2 lib/rbs/test/observer.rb
rbs-2.8.4 lib/rbs/test/observer.rb
rbs-2.8.3 lib/rbs/test/observer.rb
rbs-3.0.0.dev.1 lib/rbs/test/observer.rb
rbs-2.8.2 lib/rbs/test/observer.rb
rbs-2.8.1 lib/rbs/test/observer.rb
rbs-2.8.0 lib/rbs/test/observer.rb
rbs-2.8.0.pre.1 lib/rbs/test/observer.rb
rbs-2.7.0 lib/rbs/test/observer.rb
rbs-2.7.0.pre.3 lib/rbs/test/observer.rb
rbs-2.7.0.pre.2 lib/rbs/test/observer.rb
rbs-2.7.0.pre.1 lib/rbs/test/observer.rb