Method: Versionomy::Conversion::Parsing::Builder#to_modify_original_value
- Defined in:
- lib/versionomy/conversion/parsing.rb
#to_modify_original_value(&block_) ⇒ Object
Provide a block that can modify the original value prior to it being unparsed. The block should take two parameters: first, the original value to be converted, and second, the convert_params passed to convert_value (which may be nil). It should return the value to be unparsed, which may be the same as the value originally passed in. This method may fail-fast by raising a Versionomy::Errors::ConversionError if it determines that the value passed in cannot be converted as is.
155 156 157 |
# File 'lib/versionomy/conversion/parsing.rb', line 155 def to_modify_original_value(&block_) @original_value_modifier = block_ end |