Class: Pumper::Specification
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Pumper::Specification
- Defined in:
- lib/pumper/specification.rb
Instance Method Summary collapse
- #for_gemfile ⇒ Object
- #gem_file_name ⇒ Object
-
#initialize ⇒ Specification
constructor
A new instance of Specification.
- #version ⇒ Object
Constructor Details
#initialize ⇒ Specification
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_gemfile ⇒ Object
9 10 11 |
# File 'lib/pumper/specification.rb', line 9 def for_gemfile "gem '#{ name }', '~> #{ version }'" end |
#gem_file_name ⇒ Object
13 14 15 |
# File 'lib/pumper/specification.rb', line 13 def gem_file_name "#{ name }-#{ version }.gem" end |
#version ⇒ Object
17 18 19 |
# File 'lib/pumper/specification.rb', line 17 def version super.to_s end |