Class: Orthoses::Tap

Inherits:
Object
  • Object
show all
Defined in:
lib/orthoses/tap.rb

Overview

use Orthoses::Tap do |store|

store["Foo::Bar"] << "def baz: () -> void"

end

Instance Method Summary collapse

Constructor Details

#initialize(loader, &block) ⇒ Tap

Returns a new instance of Tap.



8
9
10
11
# File 'lib/orthoses/tap.rb', line 8

def initialize(loader, &block)
  @loader = loader
  @block = block
end

Instance Method Details

#callObject



13
14
15
16
17
# File 'lib/orthoses/tap.rb', line 13

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