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.



7
8
9
10
11
12
# File 'lib/suppository/repository.rb', line 7

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

Instance Attribute Details

#archsObject (readonly)

Returns the value of attribute archs.



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

def archs
  @archs
end

#distsObject (readonly)

Returns the value of attribute dists.



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

def dists
  @dists
end

#pathObject (readonly)

Returns the value of attribute path.



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

def path
  @path
end

#suppositoryObject (readonly)

Returns the value of attribute suppository.



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

def suppository
  @suppository
end

Instance Method Details

#exist?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/suppository/repository.rb', line 14

def exist?
  File.exist? @suppository
end