Class Versionomy::Format::Delimiter::SymbolFieldBuilder
In: lib/versionomy/format/delimiter.rb
Parent: Object

This class defines methods that can be called from the block passed to Versionomy::Format::Delimiter::Builder#field if the field is of symbolic type.

Methods

Included Modules

::Blockenspiel::DSL

Public Instance methods

Recognize a symbolic value represented by a particular regular expression. The regular expression must be passed as a string. E.g. use "[a-z]+" instead of /[a-z]+/. The "canonical" parameter indicates the canonical syntax for the value, for use in unparsing.

Using the opts parameter, you can override any of the field‘s overall parsing options.

Recognize a set of symbolic values, each represented by a particular regular expression, but all sharing the same delimiters and options. Use this instead of repeated calls to recognize_regexp for better performance.

Using the opts parameter, you can override any of the field‘s overall parsing options.

In the block, you should call methods of Versionomy::Format::Delimiter::MappingSymbolBuilder to map values to regular expression representations.

[Validate]