Class: UpdateHints::Checker

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

Overview

:nodoc: :all

Constant Summary collapse

GEMCUTTER_URI =
"http://rubygems.org/api/v1/versions/%s.xml"

Instance Method Summary collapse

Constructor Details

#initialize(gem_name) ⇒ Checker

Returns a new instance of Checker.



39
40
41
# File 'lib/update_hints.rb', line 39

def initialize(gem_name)
  @gem = gem_name
end

Instance Method Details

#get_latestObject



43
44
45
46
# File 'lib/update_hints.rb', line 43

def get_latest
  gem_versions_url = GEMCUTTER_URI % @gem
  extract_version_from_xml(open(gem_versions_url))
end