Class: Gem::Release::Context::Gem

Inherits:
Object
  • Object
show all
Defined in:
lib/gem/release/context/gem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Gem

Returns a new instance of Gem.


9
10
11
12
# File 'lib/gem/release/context/gem.rb', line 9

def initialize(name)
  @spec = Gemspec.new(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name


7
8
9
# File 'lib/gem/release/context/gem.rb', line 7

def name
  @name
end

#specObject (readonly)

Returns the value of attribute spec


7
8
9
# File 'lib/gem/release/context/gem.rb', line 7

def spec
  @spec
end

Instance Method Details

#filenameObject


18
19
20
# File 'lib/gem/release/context/gem.rb', line 18

def filename
  spec.gem_filename if spec
end

#spec_filenameObject


22
23
24
# File 'lib/gem/release/context/gem.rb', line 22

def spec_filename
  spec.filename if name
end

#versionObject


14
15
16
# File 'lib/gem/release/context/gem.rb', line 14

def version
  spec.version.to_s if spec
end