Module: Nesta::Overrides::Renderers
- Defined in:
- lib/nesta/overrides.rb
Instance Method Summary collapse
- #erb(template, options = {}, locals = {}) ⇒ Object
- #haml(template, options = {}, locals = {}) ⇒ Object
- #sass(template, options = {}, locals = {}) ⇒ Object
- #scss(template, options = {}, locals = {}) ⇒ Object
- #stylesheet(template, options = {}, locals = {}) ⇒ Object
Instance Method Details
#erb(template, options = {}, locals = {}) ⇒ Object
9 10 11 12 |
# File 'lib/nesta/overrides.rb', line 9 def erb(template, = {}, locals = {}) defaults, engine = Overrides.(template, :erb) super(template, defaults.merge(), locals) end |
#haml(template, options = {}, locals = {}) ⇒ Object
4 5 6 7 |
# File 'lib/nesta/overrides.rb', line 4 def haml(template, = {}, locals = {}) defaults, engine = Overrides.(template, :haml) super(template, defaults.merge(), locals) end |
#sass(template, options = {}, locals = {}) ⇒ Object
19 20 21 22 |
# File 'lib/nesta/overrides.rb', line 19 def sass(template, = {}, locals = {}) defaults, engine = Overrides.(template, :sass) super(template, defaults.merge(), locals) end |
#scss(template, options = {}, locals = {}) ⇒ Object
14 15 16 17 |
# File 'lib/nesta/overrides.rb', line 14 def scss(template, = {}, locals = {}) defaults, engine = Overrides.(template, :scss) super(template, defaults.merge(), locals) end |
#stylesheet(template, options = {}, locals = {}) ⇒ Object
24 25 26 27 28 |
# File 'lib/nesta/overrides.rb', line 24 def stylesheet(template, = {}, locals = {}) defaults, engine = Overrides.(template, :sass, :scss) renderer = Sinatra::Templates.instance_method(engine) renderer.bind(self).call(template, defaults.merge(), locals) end |