Class: Thymeleaf::Template

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject

Returns the value of attribute context

Returns:

  • (Object)

    the current value of context



8
9
10
# File 'lib/thymeleaf/template.rb', line 8

def context
  @context
end

#template_markupObject

Returns the value of attribute template_markup

Returns:

  • (Object)

    the current value of template_markup



8
9
10
# File 'lib/thymeleaf/template.rb', line 8

def template_markup
  @template_markup
end

Instance Method Details

#renderObject



9
10
11
# File 'lib/thymeleaf/template.rb', line 9

def render
  do_render template_markup
end

#render_fileObject



13
14
15
16
17
18
19
# File 'lib/thymeleaf/template.rb', line 13

def render_file
  template_markup_uri = Thymeleaf.configuration.template_uri(template_markup)
  
  template_file_open template_markup_uri do |template|
    do_render template
  end
end