loosen contract on Resource#source_file to Maybe[String] (#1906)

this could legitimately return nil if there is no file_descriptor, as would be the case for a StringResource
This commit is contained in:
Steven Sloan 2016-05-05 12:08:29 -04:00 committed by Thomas Reynolds
parent 599cf1e6d3
commit cf4d40caff

View file

@ -80,7 +80,7 @@ module Middleman
# Backwards compatible method for turning descriptor into a string.
# @return [String]
Contract String
Contract Maybe[String]
def source_file
file_descriptor && file_descriptor[:full_path].to_s
end