Tilt::Template
An adapter class for Tilt (github.com/rtomayko/tilt) :todo: Add an example or two.
Tilt::Template API: returns true if Inversion is loaded.
# File lib/inversion/tilt.rb, line 13 def self::engine_initialized? return defined?( Inversion::Template ) end
Tilt::Template API: render the template with the given scope, locals, and block.
# File lib/inversion/tilt.rb, line 38 def evaluate( scope, locals, &block ) @template.attributes.merge!( scope.to_h ) if scope.respond_to?( :to_h ) @template.attributes.merge!( locals ) return @template.render( &block ) end
Tilt::Template API: lazy-load Inversion
# File lib/inversion/tilt.rb, line 19 def initialize_engine require_template_library 'inversion' end
Generated with the Darkfish Rdoc Generator 2.