lib/vedeu/support/template.rb in vedeu-0.4.13 vs lib/vedeu/support/template.rb in vedeu-0.4.14

- old
+ new

@@ -41,10 +41,13 @@ # @raise [MissingRequired] when the path is empty. # @raise [MissingRequired] when the path does not exist. # @return [String] def path fail MissingRequired, 'No path to template specified.' if @path.empty? - fail MissingRequired, 'Template file cannot be found.' unless File.exist?(@path) + + unless File.exist?(@path) + fail MissingRequired, 'Template file cannot be found.' + end @path end end # Template