Class: Spade::Repository
- Inherits:
-
Object
- Object
- Spade::Repository
- Defined in:
- lib/spade/repository.rb
Instance Attribute Summary collapse
-
#creds ⇒ Object
Returns the value of attribute creds.
-
#env ⇒ Object
Returns the value of attribute env.
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 8 |
# File 'lib/spade/repository.rb', line 5 def initialize self.env = Environment.new self.creds = Credentials.new(@env) end |
Instance Attribute Details
#creds ⇒ Object
Returns the value of attribute creds.
3 4 5 |
# File 'lib/spade/repository.rb', line 3 def creds @creds end |
#env ⇒ Object
Returns the value of attribute env.
3 4 5 |
# File 'lib/spade/repository.rb', line 3 def env @env end |
Instance Method Details
#dependency_for(packages) ⇒ Object
14 15 16 |
# File 'lib/spade/repository.rb', line 14 def dependency_for(packages) Gem::Dependency.new(/(#{packages.join('|')})/, Gem::Requirement.default) end |
#logged_in? ⇒ Boolean
10 11 12 |
# File 'lib/spade/repository.rb', line 10 def logged_in? !self.creds.api_key.nil? end |