module Femto::Renderer

Public Class Methods

render(type, content) click to toggle source
# File lib/femto/renderer.rb, line 9
def self.render(type, content)
  renderer = @renderers[type]
  raise RendererNotFoundException.new('No renderer for type ' + type.inspect) unless renderer
  renderer.call content
end
renderer(type, &block) click to toggle source
# File lib/femto/renderer.rb, line 15
def self.renderer(type, &block)
  @renderers[type] = block
end