Class: Tilt::RadiusTemplate
Overview
Radius Template github.com/jlong/radius/
Defined Under Namespace
Classes: ContextClass
Instance Attribute Summary
Attributes inherited from Template
#compiled_path, #data, #file, #line, #options
Instance Method Summary collapse
Methods inherited from Template
#basename, #compiled_method, default_mime_type, default_mime_type=, #eval_file, #initialize, metadata, #metadata, #name, #render
Constructor Details
This class inherits a constructor from Tilt::Template
Instance Method Details
#allows_script? ⇒ Boolean
37 38 39 |
# File 'lib/tilt/radius.rb', line 37 def allows_script? false end |
#evaluate(scope, locals, &block) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/tilt/radius.rb', line 23 def evaluate(scope, locals, &block) context = ContextClass.new context.tilt_scope = scope context.define_tag("yield", &block) if block locals.each do |tag, value| context.define_tag(tag) do value end end @options[:tag_prefix] = 'r' unless @options.has_key?(:tag_prefix) Radius::Parser.new(context, @options).parse(@data) end |