Class: Hanamismith::Extensions::Asset
- Inherits:
-
Object
- Object
- Hanamismith::Extensions::Asset
- Defined in:
- lib/hanamismith/extensions/asset.rb
Overview
Ensures assets are compiled.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration) ⇒ Asset
constructor
A new instance of Asset.
Constructor Details
#initialize(configuration) ⇒ Asset
Returns a new instance of Asset.
15 16 17 18 |
# File 'lib/hanamismith/extensions/asset.rb', line 15 def initialize(configuration, **) super(**) @configuration = configuration end |
Class Method Details
.call ⇒ Object
13 |
# File 'lib/hanamismith/extensions/asset.rb', line 13 def self.call(...) = new(...).call |
Instance Method Details
#call ⇒ Object
20 21 22 23 |
# File 'lib/hanamismith/extensions/asset.rb', line 20 def call logger.error { "Unable to compile assets. Try: `hanami assets compile`." } unless run configuration end |