Sha256: 23cd963fef59a7f9c8a8e159c65d46daff7cb14c8819e17cfa060c62d45768e1

Contents?: true

Size: 339 Bytes

Versions: 29

Compression:

Stored size: 339 Bytes

Contents

# frozen_string_literal: true

module Orthoses
  # use Orthoses::Tap do |store|
  #   store["Foo::Bar"] << "def baz: () -> void"
  # end
  class Tap
    def initialize(loader, &block)
      @loader = loader
      @block = block
    end

    def call
      @loader.call.tap do |store|
        @block.call(store)
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
orthoses-1.17.0 lib/orthoses/tap.rb
orthoses-1.16.0 lib/orthoses/tap.rb
orthoses-1.15.0 lib/orthoses/tap.rb
orthoses-1.14.0 lib/orthoses/tap.rb
orthoses-1.13.0 lib/orthoses/tap.rb
orthoses-1.12.0 lib/orthoses/tap.rb
orthoses-1.11.0 lib/orthoses/tap.rb
orthoses-1.10.0 lib/orthoses/tap.rb
orthoses-1.9.0 lib/orthoses/tap.rb
orthoses-1.8.0 lib/orthoses/tap.rb
orthoses-1.7.0 lib/orthoses/tap.rb
orthoses-1.6.0 lib/orthoses/tap.rb
orthoses-1.5.0 lib/orthoses/tap.rb
orthoses-1.4.0 lib/orthoses/tap.rb
orthoses-1.3.0 lib/orthoses/tap.rb
orthoses-1.2.0 lib/orthoses/tap.rb
orthoses-1.1.0 lib/orthoses/tap.rb
orthoses-1.0.0 lib/orthoses/tap.rb
orthoses-0.11.0 lib/orthoses/tap.rb
orthoses-0.10.0 lib/orthoses/tap.rb