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

#convert, #source, #target

Instance Method Summary collapse

Methods inherited from Converter

create, #fail_conversion_type, #initialize

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'


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

def call(value, _)
  value.to_s
end