Class: Hanamismith::Extensions::NPM
- Inherits:
-
Object
- Object
- Hanamismith::Extensions::NPM
- Defined in:
- lib/hanamismith/extensions/npm.rb
Overview
Ensures NPM packages are installed if NPM is available.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration) ⇒ NPM
constructor
A new instance of NPM.
Constructor Details
#initialize(configuration) ⇒ NPM
Returns a new instance of NPM.
18 19 20 21 |
# File 'lib/hanamismith/extensions/npm.rb', line 18 def initialize(configuration, **) super(**) @configuration = configuration end |
Class Method Details
.call ⇒ Object
16 |
# File 'lib/hanamismith/extensions/npm.rb', line 16 def self.call(...) = new(...).call |
Instance Method Details
#call ⇒ Object
23 24 25 26 |
# File 'lib/hanamismith/extensions/npm.rb', line 23 def call logger.error { "Unable to detect NPM. Install NPM and run: `npm install`." } unless run configuration end |