Class: Util

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/autoswagger/util.rb

Class Method Summary collapse

Class Method Details

.detect_integer_id(sentense) ⇒ Object



6
7
8
# File 'lib/rspec/autoswagger/util.rb', line 6

def self.detect_integer_id(sentense)
  sentense.match(/^(\d+)$/)
end

.detect_uuid(sentense) ⇒ Object



2
3
4
# File 'lib/rspec/autoswagger/util.rb', line 2

def self.detect_uuid(sentense)
  sentense.match(/^([a-zA-Z0-9]+-[a-zA-Z0-9]+-[a-zA-Z0-9]++-[a-zA-Z0-9]+-[a-zA-Z0-9]+)$/)
end