Class: Fixnum

Inherits:
Object show all
Defined in:
lib/conversion/class_decoration.rb

Class Method Summary collapse

Class Method Details

.to_converter_procObject

Returns a Proc that converts to Integer

Fixnum.to_converter_proc.call('1') # => 1

Note that the result may not be a Fixnum.

See Conversion.converter, Object#convert_to



25
26
27
# File 'lib/conversion/class_decoration.rb', line 25

def to_converter_proc
  Integer.to_converter_proc
end