Class: Alchemrest::Transforms::Constraint::MatchesRegex

Inherits:
Alchemrest::Transforms::Constraint show all
Defined in:
lib/alchemrest/transforms/constraint/matches_regex.rb

Direct Known Subclasses

IsUuid

Instance Method Summary collapse

Instance Method Details

#descriptionObject



13
14
15
# File 'lib/alchemrest/transforms/constraint/matches_regex.rb', line 13

def description
  "matches #{regex.inspect}"
end

#meets_conditions?(input) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/alchemrest/transforms/constraint/matches_regex.rb', line 9

def meets_conditions?(input)
  input.match?(regex)
end