class Versionomy::Format::Delimiter::StringFieldBuilder
This class defines methods that can be called from the block passed to Versionomy::Format::Delimiter::Builder#field if the field is of string type.
Public Instance Methods
recognize_regexp(regexp_, opts_={})
click to toggle source
Recognize a string field whose value matches a regular expression. The regular expression must be passed as a string. E.g. use “[a-z]+” instead of /[a-z]+/. Using the opts parameter, you can override any of the field's overall parsing options.
# File lib/versionomy/format/delimiter.rb, line 570 def recognize_regexp(regexp_, opts_={}) @recognizers << Delimiter::RegexpStringRecognizer.new(@field, regexp_, @default_opts.merge(opts_)) end