Class: Deface::Sources::Haml

Inherits:
Source
  • Object
show all
Defined in:
lib/deface/sources/haml.rb

Class Method Summary collapse

Methods inherited from Source

to_sym

Class Method Details

.execute(override) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/deface/sources/haml.rb', line 4

def self.execute(override)
  if Rails.application.config.deface.haml_support
    haml_engine = Deface::HamlConverter.new(override.args[:haml])
    haml_engine.render
  else
    raise Deface::NotSupportedError, "`#{override.name}` supplies :haml source, but haml_support is not detected."
  end
end