Sha256: f90f257c9b958bc465474b3bca9d52059775c8094d62b4df8b35faac58c1d80f
Contents?: true
Size: 583 Bytes
Versions: 12
Compression:
Stored size: 583 Bytes
Contents
# frozen_string_literal: true module Leftovers module Haml module_function def precompile(file, name) return '' unless Leftovers.try_require('haml', message: <<~MESSAGE) # rubocop:disable Layout/EmptyLineAfterGuardClause Skipped parsing #{name.relative_path}, because the haml gem was not available `gem install haml` MESSAGE begin ::Haml::Engine.new(file).precompiled rescue ::Haml::SyntaxError => e Leftovers.warn "#{e.class}: #{e.message} #{name.relative_path}:#{e.line}" '' end end end end
Version data entries
12 entries across 12 versions & 1 rubygems