lib/hanami/assets/compressors/abstract.rb in hanami-assets-1.0.0 vs lib/hanami/assets/compressors/abstract.rb in hanami-assets-1.1.0.beta1
- old
+ new
@@ -100,13 +100,13 @@
# implementation of a compressor
#
# @since 0.1.0
# @api private
def self.load_engine(type, engine_name)
- type = Utils::String.new(type).demodulize
+ type = Utils::String.demodulize(type)
- require "hanami/assets/compressors/#{ engine_name }_#{ type.underscore }"
- Utils::Class.load!("#{ Utils::String.new(engine_name).classify }#{ type }", Hanami::Assets::Compressors).new
+ require "hanami/assets/compressors/#{ engine_name }_#{ Utils::String.underscore(type) }"
+ Utils::Class.load!("#{ Utils::String.classify(engine_name) }#{ type }", Hanami::Assets::Compressors).new
rescue LoadError
raise UnknownCompressorError.new(type, engine_name)
end
class << self