Class: Spek::Versioner
- Inherits:
-
Object
- Object
- Spek::Versioner
- Defined in:
- lib/spek/versioner.rb
Overview
Updates a gem specification’s version.
Class Method Summary collapse
Instance Method Summary collapse
- #call(version, path) ⇒ Object
-
#initialize(loader: Loader.new) ⇒ Versioner
constructor
A new instance of Versioner.
Constructor Details
Class Method Details
.call(version, path) ⇒ Object
10 |
# File 'lib/spek/versioner.rb', line 10 def self.call(version, path, ...) = new(...).call version, path |
Instance Method Details
#call(version, path) ⇒ Object
16 17 18 19 |
# File 'lib/spek/versioner.rb', line 16 def call version, path Pathname(path).rewrite { |content| content.sub(/version.+\n/, %(version = "#{version}"\n)) } loader.call path end |