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

Version Path
overview-0.0.4.17 lib/helpers/string.rb
overview-0.0.4.14 lib/helpers/string.rb
overview-0.0.4.12 lib/helpers/string.rb
overview-0.0.3.61 lib/appversion/string.rb
overview-0.0.3.56 lib/appversion/string.rb
overview-0.0.3.pre.debug.54 lib/appversion/string.rb
overview-0.0.3.pre.debug.51 lib/appversion/string.rb
overview-0.0.3.49 lib/appversion/string.rb
overview-0.0.3.47 lib/appversion/string.rb
overview-0.0.3.45 lib/appversion/string.rb
overview-0.0.2.43 lib/appversion/string.rb
overview-0.0.2.1.40 lib/appversion/string.rb