lib/compel/builder/string.rb in compel-0.3.2 vs lib/compel/builder/string.rb in compel-0.3.4

- old
+ new

@@ -8,20 +8,10 @@ def initialize super(Coercion::String) end def format(regex) - options[:format] = Coercion.coerce!(regex, ::Regexp) - self - end - - def min_length(value) - options[:min_length] = Coercion.coerce!(value, ::Integer) - self - end - - def max_length(value) - options[:max_length] = Coercion.coerce!(value, ::Integer) + options[:format] = Coercion.coerce!(regex, Coercion::Regexp) self end end