Class: Hanamismith::Extensions::Asset

Inherits:
Object
  • Object
show all
Defined in:
lib/hanamismith/extensions/asset.rb

Overview

Ensures assets are compiled.

Class Method Summary collapse

Instance Method Summary collapse

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

.callObject



13
# File 'lib/hanamismith/extensions/asset.rb', line 13

def self.call(...) = new(...).call

Instance Method Details

#callObject



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