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:
parent
599cf1e6d3
commit
cf4d40caff
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue