Class Versionomy::Format::Delimiter::IntegerFieldBuilder
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 integer type.

Methods

Included Modules

::Blockenspiel::DSL

Public Instance methods

Recognize a letter-formatted integer field. That is, the value is formatted as an alphabetic letter where "a" represents 1, up to "z" representing 26.

Using the opts parameter, you can override any of the field‘s overall parsing options. You may also set the following additional options:

:case:Case-sensitivity of the letter. Possible values are :upper, :lower, and :either. Default is :either.

Recognize a numeric-formatted integer field. Using the opts parameter, you can override any of the field‘s overall parsing options. You may also set the following additional options:

:strip_leading_zeros:If false (the default), and a value has leading zeros, it is assumed that the field has a minimum width, and unparsing will always pad left with zeros to reach that minimum width. If set to true, leading zeros are stripped from a value, and this padding is never done.

[Validate]