Class: Suppository::Repository

Inherits:
Object
  • Object
show all
Defined in:
lib/suppository/repository.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Repository

Returns a new instance of Repository.



5
6
7
8
9
10
# File 'lib/suppository/repository.rb', line 5

def initialize(path)
  @path = File.expand_path(path)
  @dists = %w(natty lucid precise saucy trusty)
  @archs = %w(amd64 i386)
  @suppository = "#{@path}/.suppository"
end

Instance Attribute Details

#archsObject (readonly)

Returns the value of attribute archs.



3
4
5
# File 'lib/suppository/repository.rb', line 3

def archs
  @archs
end

#distsObject (readonly)

Returns the value of attribute dists.



3
4
5
# File 'lib/suppository/repository.rb', line 3

def dists
  @dists
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/suppository/repository.rb', line 3

def path
  @path
end

#suppositoryObject (readonly)

Returns the value of attribute suppository.



3
4
5
# File 'lib/suppository/repository.rb', line 3

def suppository
  @suppository
end

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/suppository/repository.rb', line 12

def exist?
  File.exist? @suppository
end