Class: GemMirror::VersionsFetcher
- Inherits:
-
Object
- Object
- GemMirror::VersionsFetcher
- Defined in:
- lib/gem_mirror/versions_fetcher.rb
Overview
The VersionsFetcher class is used for retrieving the file that contains all registered Gems and their versions.
Instance Attribute Summary collapse
- #source ⇒ Source readonly
Instance Method Summary collapse
- #fetch ⇒ GemMirror::VersionsFile
-
#initialize(source) ⇒ VersionsFetcher
constructor
A new instance of VersionsFetcher.
Constructor Details
#initialize(source) ⇒ VersionsFetcher
Returns a new instance of VersionsFetcher.
17 18 19 |
# File 'lib/gem_mirror/versions_fetcher.rb', line 17 def initialize(source) @source = source end |
Instance Attribute Details
#source ⇒ Source (readonly)
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/gem_mirror/versions_fetcher.rb', line 11 class VersionsFetcher attr_reader :source ## # @param [Source] source # def initialize(source) @source = source end ## # @return [GemMirror::VersionsFile] # def fetch GemMirror.configuration.logger.info( "Updating #{source.name} (#{source.host})" ) VersionsFile.load(source.fetch_versions) end end |
Instance Method Details
#fetch ⇒ GemMirror::VersionsFile
24 25 26 27 28 29 30 |
# File 'lib/gem_mirror/versions_fetcher.rb', line 24 def fetch GemMirror.configuration.logger.info( "Updating #{source.name} (#{source.host})" ) VersionsFile.load(source.fetch_versions) end |