lib/thinreports/layout/base.rb in thinreports-0.10.1 vs lib/thinreports/layout/base.rb in thinreports-0.10.2
- old
+ new
@@ -12,12 +12,10 @@
# @raise [Thinreports::Errors::InvalidLayoutFormat]
# @raise [Thinreports::Errors::IncompatibleLayoutFormat]
def load_format(filename)
filename += ".#{EXT_NAME}" unless filename =~ /\.#{EXT_NAME}$/
- unless File.exist?(filename)
- raise Thinreports::Errors::LayoutFileNotFound
- end
+ raise Thinreports::Errors::LayoutFileNotFound unless File.exist?(filename)
# Build format.
Thinreports::Layout::Format.build(filename)
end
end