class Array
Public Instance Methods
generate(expected_errors: [], **synonyms)
click to toggle source
It will generate an string following the pattern specified The positions with string patterns need to be supplied like symbols: [:“10:N”, “fixed”, :“10-20:XN/x/”].generate #> “1024320001fixed4OZjNMTnuBibwwj”
# File lib/string/pattern/add_to_ruby.rb, line 5 def generate(expected_errors: [], **synonyms) StringPattern.generate(self, expected_errors: expected_errors, **synonyms) end
Also aliased as: gen
val(string_to_validate, expected_errors: [], not_expected_errors: [], **synonyms)
Alias for: validate
validate(string_to_validate, expected_errors: [], not_expected_errors: [], **synonyms)
click to toggle source
it will validate an string following the pattern specified
# File lib/string/pattern/add_to_ruby.rb, line 12 def validate(string_to_validate, expected_errors: [], not_expected_errors: [], **synonyms) StringPattern.validate(text: string_to_validate, pattern: self, expected_errors: expected_errors, not_expected_errors: not_expected_errors, **synonyms) end
Also aliased as: val