Class: GemUpdater::RubyGemsFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_updater/ruby_gems_fetcher.rb

Overview

RubyGemsFetcher is a wrapper around rubygems API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem_name, source) ⇒ RubyGemsFetcher


13
14
15
16
# File 'lib/gem_updater/ruby_gems_fetcher.rb', line 13

def initialize( gem_name, source )
  @gem_name = gem_name
  @source   = source
end

Instance Attribute Details

#gem_nameObject (readonly)

Returns the value of attribute gem_name


9
10
11
# File 'lib/gem_updater/ruby_gems_fetcher.rb', line 9

def gem_name
  @gem_name
end

#sourceObject (readonly)

Returns the value of attribute source


9
10
11
# File 'lib/gem_updater/ruby_gems_fetcher.rb', line 9

def source
  @source
end

Instance Method Details

#source_uriString|nil

Finds where code is hosted. Most likely in will be on rubygems, else look in other sources.


22
23
24
# File 'lib/gem_updater/ruby_gems_fetcher.rb', line 22

def source_uri
  uri_from_rubygems || uri_from_other_sources
end