lib/gist_updater/content.rb in gist_updater-0.4.5 vs lib/gist_updater/content.rb in gist_updater-0.4.6
- old
+ new
@@ -50,10 +50,11 @@
def local
@local ||= File.read(file_path)
end
def pick_a_file(resource)
- resource.files[file_name] if resource
+ files = resource&.files
+ files[file_name] if files
end
# Update a Gist file
#
# @return [Sawyer::Resource]