diff --git a/lib/linguist/lazy_blob.rb b/lib/linguist/lazy_blob.rb index 34cd7f45..14477241 100644 --- a/lib/linguist/lazy_blob.rb +++ b/lib/linguist/lazy_blob.rb @@ -1,6 +1,7 @@ require 'linguist/blob_helper' require 'linguist/language' require 'rugged' +require 'pry' module Linguist class LazyBlob @@ -14,20 +15,18 @@ module Linguist attr_reader :repository attr_reader :oid - attr_reader :name + attr_reader :path attr_reader :mode - def initialize(repo, oid, name, mode = nil) + alias :name :path + + def initialize(repo, oid, path, mode = nil) @repository = repo @oid = oid - @name = name + @path = path @mode = mode end - def path - name - end - def git_attributes @git_attributes ||= repository.fetch_attributes( name, GIT_ATTR, GIT_ATTR_FLAGS)