Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/semantic/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#is_version?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/semantic/core_ext.rb', line 6

def is_version?
  (match Semantic::Version::SemVerRegexp) ? true : false
end

#to_versionObject



2
3
4
# File 'lib/semantic/core_ext.rb', line 2

def to_version
  Semantic::Version.new self
end