Class: Docks::Renderers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/docks/renderers/base_renderer.rb

Direct Known Subclasses

ERB, Haml, Slim

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



4
# File 'lib/docks/renderers/base_renderer.rb', line 4

def initialize; @cache = {} end

Instance Method Details

#ivars=(ivars) ⇒ Object



10
11
12
13
14
# File 'lib/docks/renderers/base_renderer.rb', line 10

def ivars=(ivars)
  ivars.each do |ivar, value|
    instance_variable_set("@#{ivar}".to_sym, value)
  end
end

#render(template, locals = {}) ⇒ Object

Raises:

  • (NotImplementedError)


6
7
8
# File 'lib/docks/renderers/base_renderer.rb', line 6

def render(template, locals = {})
  raise NotImplementedError.new("You must provide a `render` method.")
end