class Elasticsearch::Git::LiteBlob
Attributes
commit_id[RW]
data[W]
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 13 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 end
Public Instance Methods
data()
click to toggle source
# File lib/elasticsearch/git/lite_blob.rb, line 23 def data @data ||= encode!(@blob.content) end