Class: Thymeleaf::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/thymeleaf/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



24
25
26
27
28
29
# File 'lib/thymeleaf/configuration.rb', line 24

def initialize
  self.dialects = Dialects.new
  self.template = TemplateResolver.new
  self.parser   = ParseOptions.new
  add_dialect DefaultDialect
end

Instance Attribute Details

#dialectsObject

Returns the value of attribute dialects.



22
23
24
# File 'lib/thymeleaf/configuration.rb', line 22

def dialects
  @dialects
end

#parserObject

Returns the value of attribute parser.



22
23
24
# File 'lib/thymeleaf/configuration.rb', line 22

def parser
  @parser
end

#templateObject

Returns the value of attribute template.



22
23
24
# File 'lib/thymeleaf/configuration.rb', line 22

def template
  @template
end

Instance Method Details

#add_dialect(*args) ⇒ Object



31
32
33
# File 'lib/thymeleaf/configuration.rb', line 31

def add_dialect(*args)
  dialects.add_dialect(*args)
end

#clear_dialectsObject



35
36
37
# File 'lib/thymeleaf/configuration.rb', line 35

def clear_dialects
  dialects.clear_dialects
end

#template_uri(name) ⇒ Object



39
40
41
# File 'lib/thymeleaf/configuration.rb', line 39

def template_uri(name)
  template.get_template(name)
end