Class: Necromancer::NumericConverters::IntegerToStringConverter

Inherits:
Converter
  • Object
show all
Defined in:
lib/necromancer/converters/numeric.rb

Overview

An object that converts an Integer to a String

Instance Attribute Summary

Attributes inherited from Converter

#config, #convert, #source, #target

Instance Method Summary collapse

Methods inherited from Converter

create, #initialize, #raise_conversion_type

Constructor Details

This class inherits a constructor from Necromancer::Converter

Instance Method Details

#call(value, **_) ⇒ Object

Convert integer value to string

Examples:

converter.call(1)  # => "1"


36
37
38
# File 'lib/necromancer/converters/numeric.rb', line 36

def call(value, **_)
  value.to_s
end