Class: Spade::Packager::Repository

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

Direct Known Subclasses

Local, Remote

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRepository

Returns a new instance of Repository.



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

def initialize
  self.creds = Credentials.new
end

Instance Attribute Details

#credsObject

Returns the value of attribute creds.



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

def creds
  @creds
end

Instance Method Details

#dependency_for(packages) ⇒ Object



13
14
15
# File 'lib/spade/packager/repository.rb', line 13

def dependency_for(packages)
  LibGems::Dependency.new(/(#{packages.join('|')})/, LibGems::Requirement.default)
end

#logged_in?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/spade/packager/repository.rb', line 9

def logged_in?
  !self.creds.api_key.nil?
end