Class Versionomy::Conversion::Parsing
In: lib/versionomy/conversion/parsing.rb
Parent: Base

A conversion strategy that relies on parsing. Essentially, it unparses the value and then attempts to parse it with the new format.

Methods

convert_value   new  

Classes and Modules

Class Versionomy::Conversion::Parsing::Builder

Public Class methods

Create a parsing conversion.

By default, this just unparses and reparses using the default parse settings. In some cases, this may be enough, but you may wish to improve the reliability of the conversion by tweaking the parsing settings. To do so, pass a block to the new method, and call methods of Versionomy::Conversion::Parsing::Builder in that block.

Public Instance methods

Returns a value equivalent to the given value in the given format.

The convert_params are passed to this conversion‘s customization blocks (if any).

Raises Versionomy::Errors::ConversionError if the conversion failed. Typically, this is due to a failure of the parsing or unparsing.

[Validate]