Sha256: 87a9e6dd6be9fcbbf21bc19cd3795d0531564bad80e6fa520115d82869bd877f

Contents?: true

Size: 518 Bytes

Versions: 21

Compression:

Stored size: 518 Bytes

Contents

require 'zafu/template'

module Zafu
  module TestHelper
    include RubyLess::SafeClass

    def zafu_erb(source, src_helper = self, compiler = Zafu::Compiler)
      Zafu::Template.new(source, src_helper, compiler).to_erb(compilation_context)
    end

    def zafu_render(source, src_helper = self, compiler = Zafu::Compiler)
      eval Zafu::Template.new(source, src_helper, compiler).to_ruby(compilation_context)
    end

    def compilation_context
      {:node => @node_context, :helper => self}
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
zena-1.2.2 lib/zafu/test_helper.rb
zafu-0.8.6 lib/zafu/test_helper.rb
zafu-0.8.5 lib/zafu/test_helper.rb
zafu-0.8.4 lib/zafu/test_helper.rb
zafu-0.8.3 lib/zafu/test_helper.rb
zafu-0.8.2 lib/zafu/test_helper.rb
zafu-0.8.0 lib/zafu/test_helper.rb
zafu-0.7.9 lib/zafu/test_helper.rb
zafu-0.7.8 lib/zafu/test_helper.rb
zafu-0.7.7 lib/zafu/test_helper.rb
zafu-0.7.6 lib/zafu/test_helper.rb
zafu-0.7.5 lib/zafu/test_helper.rb
zafu-0.7.4 lib/zafu/test_helper.rb
zafu-0.7.3 lib/zafu/test_helper.rb
zafu-0.7.2 lib/zafu/test_helper.rb
zafu-0.7.1 lib/zafu/test_helper.rb
zafu-0.7.0 lib/zafu/test_helper.rb
zafu-0.6.3 lib/zafu/test_helper.rb
zafu-0.6.2 lib/zafu/test_helper.rb
zafu-0.6.1 lib/zafu/test_helper.rb