lib/buildmaster/file_processor.rb in BuildMaster-0.6.0 vs lib/buildmaster/file_processor.rb in BuildMaster-0.7.0
- old
+ new
@@ -36,27 +36,13 @@
def process_html()
return process_html_content(File.open(@content_path))
end
- private
def process_html_content(source)
- document_with_skin = @template.process(source) do |message|
- begin
- method = @evaluator.method(message)
- if (method.arity == 0)
- method.call
- else
- method.call(@content_path)
- end
- rescue NameError
- raise TemplateException,
- "unable to process message: #{message}: #{$!}" ,
- caller
- end
+ document_with_skin = @template.process(source) {|message| @evaluator.evaluate(message, @content_path)}
+ return document_with_skin
end
- return document_with_skin
- end
end
end
\ No newline at end of file