Class: Archangel::DesignRenderService

Inherits:
RenderService show all
Defined in:
app/services/archangel/design_render_service.rb

Overview

Template Liquid render service

Instance Attribute Summary

Attributes inherited from RenderService

#assigns, #local_filters, #local_registers, #template

Instance Method Summary collapse

Methods inherited from RenderService

call, #initialize

Constructor Details

This class inherits a constructor from Archangel::RenderService

Instance Method Details

#callString

Render the Liquid content for template

Returns:

  • (String)

    the rendered content for template


13
14
15
16
17
18
# File 'app/services/archangel/design_render_service.rb', line 13

def call
  template_content = build_template(template)

  liquid = ::Liquid::Template.parse(template_content)
  liquid.send(:render, stringify_assigns, liquid_options).html_safe
end