File: example9.rb

package info (click to toggle)
erubis 2.6.2-3.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,064 kB
  • ctags: 1,320
  • sloc: ruby: 6,193; makefile: 108; ansic: 97; php: 17
file content (8 lines) | stat: -rw-r--r-- 285 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
require 'erubis'
input = File.read('example9.eruby')
eruby1 = Erubis::Eruby.new(input)
eruby2 = Erubis::Eruby.new(input, :preamble=>false, :postamble=>false)

puts eruby1.src   # print preamble and postamble
puts "--------------"
puts eruby2.src   # don't print preamble and postamble