~ubuntu-branches/ubuntu/saucy/ruby-erubis/saucy

« back to all changes in this revision

Viewing changes to test/data/users-guide/bufvar-example.rb

  • Committer: Package Import Robot
  • Author(s): Laurent Bigonville
  • Date: 2012-01-26 15:15:58 UTC
  • Revision ID: package-import@ubuntu.com-20120126151558-9u7mnf9ooqnw3bwz
Tags: upstream-2.7.0
ImportĀ upstreamĀ versionĀ 2.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require 'erubis'
 
2
input = File.read('example.eruby')
 
3
 
 
4
puts "----- default -----"
 
5
eruby = Erubis::FastEruby.new(input)
 
6
puts eruby.src
 
7
 
 
8
puts "----- with :bufvar option -----"
 
9
eruby = Erubis::FastEruby.new(input, :bufvar=>'@_out_buf')
 
10
print eruby.src