Class: Mnenv::Fetcher
- Inherits:
-
Object
- Object
- Mnenv::Fetcher
- Defined in:
- lib/mnenv/fetcher.rb
Direct Known Subclasses
Chocolatey::Fetcher, Gemfile::Fetcher, Homebrew::Fetcher, Snap::Fetcher
Instance Attribute Summary collapse
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
Instance Method Summary collapse
- #fetch_all ⇒ Object
- #fetch_and_save ⇒ Object
-
#initialize(repository: nil) ⇒ Fetcher
constructor
A new instance of Fetcher.
Constructor Details
#initialize(repository: nil) ⇒ Fetcher
Returns a new instance of Fetcher.
10 11 12 |
# File 'lib/mnenv/fetcher.rb', line 10 def initialize(repository: nil) @repository = repository || default_repository end |
Instance Attribute Details
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
8 9 10 |
# File 'lib/mnenv/fetcher.rb', line 8 def repository @repository end |
Instance Method Details
#fetch_all ⇒ Object
14 15 16 |
# File 'lib/mnenv/fetcher.rb', line 14 def fetch_all raise NotImplementedError end |
#fetch_and_save ⇒ Object
18 19 20 21 22 |
# File 'lib/mnenv/fetcher.rb', line 18 def fetch_and_save versions = fetch_all repository.save_all(versions) versions end |