Class: GitSniffer::Blob

Inherits:
Object
  • Object
show all
Defined in:
lib/git_sniffer/blob.rb

Instance Attribute Summary

Attributes inherited from Object

#sha

Instance Method Summary collapse

Methods inherited from Object

create_object, #eql?, #hash, #lazy_content_source, #lazy_type_source, object_type

Methods included from Lazy

included

Methods included from Hook

included

Constructor Details

#initialize(base, sha) ⇒ Blob

Returns a new instance of Blob.



7
8
9
# File 'lib/git_sniffer/blob.rb', line 7

def initialize(base, sha)
	super(base, sha)
end

Instance Method Details

#lazy_name_sourceObject



11
12
13
14
# File 'lib/git_sniffer/blob.rb', line 11

def lazy_name_source
	@base.exec("rev-list --all --objects") =~ /#{@sha} (.*)\n/
	$1
end