class Elasticsearch::Git::LiteBlob
Attributes
commit_id[RW]
data[RW]
id[RW]
mode[RW]
name[RW]
path[RW]
size[RW]
Public Class Methods
new(repo, raw_blob_hash)
click to toggle source
# File lib/elasticsearch/git/lite_blob.rb, line 12 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