Sha256: be0e2c01907d26e30f61d08f107369029fd4100f19f603c34f0e1ae105c3d99a
Contents?: true
Size: 606 Bytes
Versions: 17
Compression:
Stored size: 606 Bytes
Contents
require 'linguist' require 'elasticsearch/git/encoder_helper' module Elasticsearch module Git class LiteBlob include Linguist::BlobHelper include Elasticsearch::Git::EncoderHelper attr_accessor :id, :name, :path, :data, :size, :mode, :commit_id def initialize(repo, raw_blob_hash) @id = raw_blob_hash[:oid] blob = repo.lookup(@id) @mode = raw_blob_hash[:mode].to_s(8) @size = blob.size @path = encode!(raw_blob_hash[:path]) @name = @path.split('/').last @data = encode!(blob.content) end end end end
Version data entries
17 entries across 17 versions & 2 rubygems