Class: GitDump::Repo

Inherits:
Object
  • Object
show all
Defined in:
lib/git_dump/repo.rb,
lib/git_dump/repo/git.rb,
lib/git_dump/repo/rugged.rb

Overview

Main class: create/initialize repository, find versions, provide interface to git

Defined Under Namespace

Modules: Git, Rugged

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, options) ⇒ Repo

Returns a new instance of Repo.



25
26
27
28
# File 'lib/git_dump/repo.rb', line 25

def initialize(path, options)
  @path = path
  resolve(path, options)
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



23
24
25
# File 'lib/git_dump/repo.rb', line 23

def path
  @path
end

Instance Method Details

#inspectObject



40
41
42
# File 'lib/git_dump/repo.rb', line 40

def inspect
  "#<#{self.class} path=#{path}>"
end

#new_versionObject

New version builder



31
32
33
# File 'lib/git_dump/repo.rb', line 31

def new_version
  Version::Builder.new(self)
end

#versionsObject

List of versions



36
37
38
# File 'lib/git_dump/repo.rb', line 36

def versions
  Version.list(self)
end