Class: Pumper::Specification

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/pumper/specification.rb

Instance Method Summary collapse

Constructor Details

#initializeSpecification

Returns a new instance of Specification.



4
5
6
7
# File 'lib/pumper/specification.rb', line 4

def initialize
  specification = File.read(gemspec_file)
  super(eval(specification))
end

Instance Method Details

#for_gemfileObject



9
10
11
# File 'lib/pumper/specification.rb', line 9

def for_gemfile
  "gem '#{ name }', '~> #{ version }'"
end

#gem_file_nameObject



13
14
15
# File 'lib/pumper/specification.rb', line 13

def gem_file_name
  "#{ name }-#{ version }.gem"
end

#versionObject



17
18
19
# File 'lib/pumper/specification.rb', line 17

def version
  super.to_s
end