module CoreExt::Pathname
Public Instance Methods
safe_read()
click to toggle source
Returns the file contents if it exists. Returns nil otherwise.
# File lib/core_ext/pathname.rb 6 def safe_read 7 read if exist? 8 end