Class: Slimi::RailsTemplateHandler

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

Overview

Render Slim template in response to requests from Rails.

Defined Under Namespace

Classes: Renderer

Instance Method Summary collapse

Instance Method Details

#call(template, source = nil) ⇒ String

Parameters:

  • template (ActionView::Template)
  • source (String, nil) (defaults to: nil)

Returns:

  • (String)


9
10
11
12
13
14
# File 'lib/slimi/rails_template_handler.rb', line 9

def call(template, source = nil)
  Renderer.new(
    source: source,
    template: template
  ).call
end