Class: History::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/abelard/history.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(f, root, repository) ⇒ Entry

Returns a new instance of Entry.



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/abelard/history.rb', line 42

def initialize(f, root, repository)
  @git_fn = f

  @dir_fn = if root.empty?
              f
            else
              f[root.length+1..-1]
            end

  @path = repository.workdir + '/' + @dir_fn
end

Instance Attribute Details

#dir_fnObject (readonly)

dir_fn is the path to the file relative to the feed directory git_fn is the path to the file relative to the git root path is the full path



41
42
43
# File 'lib/abelard/history.rb', line 41

def dir_fn
  @dir_fn
end

#git_fnObject (readonly)

dir_fn is the path to the file relative to the feed directory git_fn is the path to the file relative to the git root path is the full path



41
42
43
# File 'lib/abelard/history.rb', line 41

def git_fn
  @git_fn
end

#pathObject (readonly)

dir_fn is the path to the file relative to the feed directory git_fn is the path to the file relative to the git root path is the full path



41
42
43
# File 'lib/abelard/history.rb', line 41

def path
  @path
end