Class: Gemstash::Upstream::GemName
- Inherits:
-
Object
- Object
- Gemstash::Upstream::GemName
- Defined in:
- lib/gemstash/upstream.rb
Overview
:nodoc:
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(upstream, gem_name) ⇒ GemName
constructor
A new instance of GemName.
- #name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(upstream, gem_name) ⇒ GemName
Returns a new instance of GemName.
48 49 50 51 |
# File 'lib/gemstash/upstream.rb', line 48 def initialize(upstream, gem_name) @upstream = upstream @id = gem_name end |
Instance Method Details
#id ⇒ Object
57 58 59 |
# File 'lib/gemstash/upstream.rb', line 57 def id @id end |
#name ⇒ Object
61 62 63 |
# File 'lib/gemstash/upstream.rb', line 61 def name @name ||= @id.gsub(/\.gem(spec\.rz)?$/i, "") end |
#to_s ⇒ Object
53 54 55 |
# File 'lib/gemstash/upstream.rb', line 53 def to_s name end |