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

Methods

Public Instance methods

[Source]

     # File lib/tilt.rb, line 810
810:     def evaluate(scope, locals, &block)
811:       context = Class.new(Radius::Context).new
812:       context.define_tag("yield") do
813:         block.call
814:       end
815:       locals.each do |tag, value|
816:         context.define_tag(tag) do
817:           value
818:         end
819:       end
820:       (class << context; self; end).class_eval do
821:         define_method :tag_missing do |tag, attr|
822:           scope.__send__(tag)  # any way to support attr as args?
823:         end
824:       end
825:       options = {:tag_prefix => 'r'}.merge(@options)
826:       parser = Radius::Parser.new(context, options)
827:       parser.parse(data)
828:     end

[Source]

     # File lib/tilt.rb, line 802
802:     def initialize_engine
803:       return if defined? ::Radius
804:       require_template_library 'radius'
805:     end

[Source]

     # File lib/tilt.rb, line 807
807:     def prepare
808:     end

[Validate]