Sha256: f55cc5b6e069004288df9c680dcc4db201783480572a4d3495fcd24db4ade407
Contents?: true
Size: 506 Bytes
Versions: 5
Compression:
Stored size: 506 Bytes
Contents
module Semvergen module Extensions module NodeModule class VersionFile def initialize(file) @file = file end def version=(new_version) content = file.read.gsub(/"version".*$/, %Q["version": "#{new_version}",]) file.truncate(0) file.write content file.flush end def file @file.rewind @file end def path @file.path end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems