Class: Fira::FiraHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/fira/helpers.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFiraHandler



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