class Float
Extensions to the Float class required by the fOOrth language system.
Public Class Methods
foorth_coerce(arg)
click to toggle source
Coerce the argument to match my type.
# File lib/fOOrth/monkey_patch/float.rb, line 9 def self.foorth_coerce(arg) Float(arg) rescue error "F40: Cannot coerce a #{arg.foorth_name} to a Float instance" end
Public Instance Methods
foorth_coerce(arg)
click to toggle source
Coerce the argument to match my type.
# File lib/fOOrth/monkey_patch/float.rb, line 16 def foorth_coerce(arg) Float(arg) rescue error "F40: Cannot coerce a #{arg.foorth_name} to a Float instance" end