Sha256: 23cd963fef59a7f9c8a8e159c65d46daff7cb14c8819e17cfa060c62d45768e1

Contents?: true

Size: 339 Bytes

Versions: 30

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

30 entries across 30 versions & 1 rubygems

Version Path
orthoses-0.10.0 lib/orthoses/tap.rb
orthoses-0.9.0 lib/orthoses/tap.rb
orthoses-0.8.0 lib/orthoses/tap.rb
orthoses-0.7.0 lib/orthoses/tap.rb
orthoses-0.6.0 lib/orthoses/tap.rb
orthoses-0.5.0 lib/orthoses/tap.rb
orthoses-0.4.0 lib/orthoses/tap.rb
orthoses-0.3.0 lib/orthoses/tap.rb
orthoses-0.2.0 lib/orthoses/tap.rb
orthoses-0.1.0 lib/orthoses/tap.rb