Class: Docks::Renderers::Base
- Inherits:
-
Object
- Object
- Docks::Renderers::Base
- Defined in:
- lib/docks/renderers/base_renderer.rb
Instance Method Summary collapse
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #ivars=(ivars) ⇒ Object
- #render(template, locals = {}) ⇒ Object
Constructor Details
#initialize ⇒ Base
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
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 |