Class: Fira::FiraHandler
- Inherits:
-
Object
- Object
- Fira::FiraHandler
- Defined in:
- lib/fira/helpers.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call(template) ⇒ Object
-
#initialize ⇒ FiraHandler
constructor
A new instance of FiraHandler.
- #render(contents, local_assigns = {}) ⇒ Object
Constructor Details
#initialize ⇒ FiraHandler
9 10 11 |
# File 'lib/fira/helpers.rb', line 9 def initialize end |
Class Method Details
.call(template) ⇒ Object
17 18 19 |
# File 'lib/fira/helpers.rb', line 17 def self.call(template) new.call(template) end |
Instance Method Details
#call(template) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/fira/helpers.rb', line 21 def call(template) results = Fira::render(template.source) input = ActionView::Template::new(results, template.identifier, template.handler, {:format => template.formats[0]}) output = ActionView::Template::Handlers::ERB::call(input) end |
#render(contents, local_assigns = {}) ⇒ Object
13 14 15 |
# File 'lib/fira/helpers.rb', line 13 def render(contents, local_assigns = {}) return Fira::render(contents) end |