Class: RailsTemplater::TemplateEngine

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_templater/template_engine.rb

Constant Summary collapse

DEFAULT =
:haml
SUPPORTED_TYPES =
[:haml, :slim, :erb]

Instance Method Summary collapse

Instance Method Details

#typeObject



7
8
9
# File 'lib/rails_templater/template_engine.rb', line 7

def type
  @type || DEFAULT
end

#type=(value) ⇒ Object

Raises:



11
12
13
14
# File 'lib/rails_templater/template_engine.rb', line 11

def type=(value)
  raise NotSupportedError unless SUPPORTED_TYPES.include?(value)
  @type ||= value
end