Class: UpdateHints::Checker
- Inherits:
-
Object
- Object
- UpdateHints::Checker
- 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
- #get_latest ⇒ Object
-
#initialize(gem_name) ⇒ Checker
constructor
A new instance of Checker.
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_latest ⇒ Object
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 |