Class: Representative::Tilt::NokogiriTemplate
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- Representative::Tilt::NokogiriTemplate
- Defined in:
- lib/representative/tilt_integration.rb
Instance Method Summary collapse
- #evaluate(scope, locals, &block) ⇒ Object
- #initialize_engine ⇒ Object
- #precompiled_template(locals) ⇒ Object
- #prepare ⇒ Object
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/representative/tilt_integration.rb', line 16 def evaluate(scope, locals, &block) r = Representative::Nokogiri.new locals[:r] = r super(scope, locals, &block) r.to_xml end |
#initialize_engine ⇒ Object
8 9 10 11 |
# File 'lib/representative/tilt_integration.rb', line 8 def initialize_engine return if defined?(Representative::Nokogiri) require_template_library 'representative/nokogiri' end |
#precompiled_template(locals) ⇒ Object
23 24 25 |
# File 'lib/representative/tilt_integration.rb', line 23 def precompiled_template(locals) data.to_str end |
#prepare ⇒ Object
13 14 |
# File 'lib/representative/tilt_integration.rb', line 13 def prepare end |