Public Class methods
new
(src, basename='rye-template')
[show source]
# File lib/rye.rb, line 287 def initialize(src, basename='rye-template') @basename = basename src = src.to_s @src, @template = src, ERB.new(src) end
Public Instance methods
delete
()
[show source]
# File lib/rye.rb, line 300 def delete File.delete(@tf.path) if File.exists?(@tf.path) end
path
()
[show source]
# File lib/rye.rb, line 292 def path if @tf.nil? @tf = Tempfile.new basename @tf.write @result @tf.close end @tf.path end
result!
(binding)
[show source]
# File lib/rye.rb, line 303 def result!(binding) @result = result(binding) end