Class: Spek::Loader
- Inherits:
-
Object
- Object
- Spek::Loader
- Defined in:
- lib/spek/loader.rb
Overview
Loads a gem’s specification.
Class Method Summary collapse
Instance Method Summary collapse
- #call(path) ⇒ Object
-
#initialize(client: ::Gem::Specification, presenter: Presenter) ⇒ Loader
constructor
A new instance of Loader.
Constructor Details
#initialize(client: ::Gem::Specification, presenter: Presenter) ⇒ Loader
8 9 10 11 |
# File 'lib/spek/loader.rb', line 8 def initialize client: ::Gem::Specification, presenter: Presenter @client = client @presenter = presenter end |
Class Method Details
.call(path) ⇒ Object
6 |
# File 'lib/spek/loader.rb', line 6 def self.call(path, ...) = new(...).call path |
Instance Method Details
#call(path) ⇒ Object
13 |
# File 'lib/spek/loader.rb', line 13 def call(path) = client.load(path.to_s).then { |record| presenter.with_default record } |