Class: Bump::CLI::UUID

Inherits:
Object
  • Object
show all
Defined in:
lib/bump/cli/uuid.rb

Constant Summary collapse

REGEXP =
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

Class Method Summary collapse

Class Method Details

.valid?(string) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/bump/cli/uuid.rb', line 6

def self.valid?(string)
  string.to_s =~ REGEXP
end