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

Methods

Public Instance methods

[Source]

     # File lib/tilt.rb, line 824
824:     def evaluate(scope, locals, &block)
825:       context = Class.new(Radius::Context).new
826:       context.define_tag("yield") do
827:         block.call
828:       end
829:       locals.each do |tag, value|
830:         context.define_tag(tag) do
831:           value
832:         end
833:       end
834:       (class << context; self; end).class_eval do
835:         define_method :tag_missing do |tag, attr|
836:           scope.__send__(tag)  # any way to support attr as args?
837:         end
838:       end
839:       options = {:tag_prefix => 'r'}.merge(@options)
840:       parser = Radius::Parser.new(context, options)
841:       parser.parse(data)
842:     end

[Source]

     # File lib/tilt.rb, line 816
816:     def initialize_engine
817:       return if defined? ::Radius
818:       require_template_library 'radius'
819:     end

[Source]

     # File lib/tilt.rb, line 821
821:     def prepare
822:     end

[Validate]