Sha256: 068b34483ee700cf5c471381e45bdc9f2d9b6fa8de551ed37bd64e041ffdaf84
Contents?: true
Size: 724 Bytes
Versions: 11
Compression:
Stored size: 724 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 and raw_blob.respond_to?('data') 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