Class Tilt::RadiusTemplate
In: lib/tilt.rb
Parent: Template

Methods

Public Instance methods

[Source]

     # File lib/tilt.rb, line 839
839:     def evaluate(scope, locals, &block)
840:       context = Class.new(Radius::Context).new
841:       context.define_tag("yield") do
842:         block.call
843:       end
844:       locals.each do |tag, value|
845:         context.define_tag(tag) do
846:           value
847:         end
848:       end
849:       (class << context; self; end).class_eval do
850:         define_method :tag_missing do |tag, attr|
851:           scope.__send__(tag)  # any way to support attr as args?
852:         end
853:       end
854:       options = {:tag_prefix => 'r'}.merge(@options)
855:       parser = Radius::Parser.new(context, options)
856:       parser.parse(data)
857:     end

[Source]

     # File lib/tilt.rb, line 831
831:     def initialize_engine
832:       return if defined? ::Radius
833:       require_template_library 'radius'
834:     end

[Source]

     # File lib/tilt.rb, line 836
836:     def prepare
837:     end

[Validate]