Class: Slimi::RailsTemplateHandler::Renderer

Inherits:
Object
  • Object
show all
Defined in:
lib/slimi/rails_template_handler.rb

Overview

Render HTML from given source and options.

Instance Method Summary collapse

Constructor Details

#initialize(source:, template:) ⇒ Renderer

Returns a new instance of Renderer.

Parameters:

  • source (String)
  • template (ActionView::Template)


20
21
22
23
24
25
26
# File 'lib/slimi/rails_template_handler.rb', line 20

def initialize(
  source:,
  template:
)
  @source = source
  @template = template
end

Instance Method Details

#callString

Returns:

  • (String)


29
30
31
# File 'lib/slimi/rails_template_handler.rb', line 29

def call
  engine.call(source)
end