Class: Gemstash::Upstream::GemName

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

Overview

:nodoc:

Instance Method Summary collapse

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

#idObject



57
58
59
# File 'lib/gemstash/upstream.rb', line 57

def id
  @id
end

#nameObject



61
62
63
# File 'lib/gemstash/upstream.rb', line 61

def name
  @name ||= @id.gsub(/\.gem(spec\.rz)?$/i, "")
end

#to_sObject



53
54
55
# File 'lib/gemstash/upstream.rb', line 53

def to_s
  name
end