debian-mirror-gitlab/lib/api/helpers/snippets_helpers.rb
2020-05-25 16:23:42 +05:30

17 lines
314 B
Ruby

# frozen_string_literal: true
module API
module Helpers
module SnippetsHelpers
def content_for(snippet)
if snippet.empty_repo?
snippet.content
else
blob = snippet.blobs.first
blob.load_all_data!
blob.data
end
end
end
end
end