Class: Wireless::Resolver::Factory

Inherits:
Wireless::Resolver show all
Defined in:
lib/wireless/resolver/factory.rb

Overview

A dependency resolver which runs its block every time the value is fetched.

Instance Method Summary collapse

Methods inherited from Wireless::Resolver

#initialize

Constructor Details

This class inherits a constructor from Wireless::Resolver

Instance Method Details

#resolve(fetcher) ⇒ Object

return the dependency provided by the block



8
9
10
# File 'lib/wireless/resolver/factory.rb', line 8

def resolve(fetcher)
  @block.call(fetcher.call)
end