Sha256: b7d0792e890d868da2506345b30c352572f9203c5c69a7214f40080d6e1c483c
Contents?: true
Size: 413 Bytes
Versions: 1
Compression:
Stored size: 413 Bytes
Contents
# encoding: utf-8 module TTY class Coercer # Coerce values into float number # # @api public class Float def self.coerce(value, strict = true) Kernel.send(:Float, value.to_s) rescue if strict raise InvalidArgument, "#{value} could not be coerced into Float" else value.to_f end end end # Float end # Coercer end # TTY
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tty-0.1.0 | lib/tty/coercer/float.rb |