Class: Spade::Packager::Repository
- Inherits:
-
Object
- Object
- Spade::Packager::Repository
- Defined in:
- lib/spade/packager/repository.rb
Instance Attribute Summary collapse
-
#creds ⇒ Object
Returns the value of attribute creds.
Instance Method Summary collapse
- #dependency_for(packages) ⇒ Object
-
#initialize ⇒ Repository
constructor
A new instance of Repository.
- #logged_in? ⇒ Boolean
Constructor Details
#initialize ⇒ Repository
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
#creds ⇒ Object
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
9 10 11 |
# File 'lib/spade/packager/repository.rb', line 9 def logged_in? !self.creds.api_key.nil? end |