Module: Types::Numeric

Extended by:
Generic
Defined in:
lib/types/numeric.rb

Class Method Summary collapse

Methods included from Generic

composite?, to_s, |

Class Method Details

.parse(input) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/types/numeric.rb', line 29

def self.parse(input)
	case input
	when Numeric then input
	when /\./ then Float(input)
	else Integer(input)
	end
end