Sha256: 25552993b2337693dabde5f42548ef4e5e0bb76dc875c90e039d8ff582cf4c7a
Contents?: true
Size: 392 Bytes
Versions: 12
Compression:
Stored size: 392 Bytes
Contents
class String def increment_version short_version_parts = self.split('.') last_digit = short_version_parts.last.to_i + 1 $stdout.puts 'Incrementing version...' "#{short_version_parts.first(short_version_parts.length-1).join(".")}.#{last_digit}" end def increment_version! replace increment_version end def is_number? true if Float(self) rescue false end end
Version data entries
12 entries across 12 versions & 1 rubygems