Sha256: 7050c76bf06f594efd37ce4d3c0804c7e9106c81d23396cca22e4b965401e2c1
Contents?: true
Size: 691 Bytes
Versions: 11
Compression:
Stored size: 691 Bytes
Contents
module Gitlab module Git class Blob include Linguist::BlobHelper attr_accessor :raw_blob def initialize(repository, sha, ref, path) @repository, @sha, @ref = repository, sha, ref @commit = @repository.commit(sha) @raw_blob = @repository.tree(@commit, path) end def data if raw_blob raw_blob.data else nil end end def name raw_blob.name end def exists? raw_blob end def empty? !data || data == '' end def mode raw_blob.mode end def size raw_blob.size end end end end
Version data entries
11 entries across 11 versions & 1 rubygems