Class: Alchemrest::Transforms::Constraint::MaxLength

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

Instance Method Summary collapse

Instance Method Details

#descriptionObject



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

def description
  "max length of #{max_length}"
end

#meets_conditions?(input) ⇒ Boolean

Returns:

  • (Boolean)


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

def meets_conditions?(input)
  input.length <= max_length
end