Sha256: d0272a5f762ff02a9e0dc1c171d4b6dde96f292bc6590a4f1e15d3af852439d9

Contents?: true

Size: 555 Bytes

Versions: 1

Compression:

Stored size: 555 Bytes

Contents

require "vrb"

class Sample < VRB
	def view_txt( text )
		"txt:#{text}"
	end
	
	def view_erb( text )
		"erb:#{super( text )}"
	end
	
	def view( path )
		"sample:#{super( path )}"
	end
	
	def output
		@version = 1.0
		
		puts view( "./sample.erb" )
=begin
sample:erb:1.0
sample:txt:2.0
=end
		
		puts view( "./sample" )
=begin
sample:File Read Error: ./sample
=end
		
		puts view( "./sample_error.erb" )
=begin
sample:View Error: ./sample_error.erb
undefined local variable or method `error' for #XXX
(erb):1:in `view_erb'
=end
	end
end

Sample.new.output

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vrb-0.1.2 sample/sample.rb