Module: Calendly::ModelUtils::ClassMethods

Defined in:
lib/calendly/models/model_utils.rb

Instance Method Summary collapse

Instance Method Details

#extract_uuid(str) ⇒ Object



68
69
70
71
72
73
# File 'lib/calendly/models/model_utils.rb', line 68

def extract_uuid(str)
  m = extract_uuid_match str
  return unless m

  defined?(self::UUID_RE_INDEX) ? m[self::UUID_RE_INDEX] : m[1]
end

#extract_uuid_match(str) ⇒ Object



60
61
62
63
64
65
66
# File 'lib/calendly/models/model_utils.rb', line 60

def extract_uuid_match(str)
  return unless defined? self::UUID_RE
  return unless str
  return if str.empty?

  self::UUID_RE.match str
end