class Integer
Extensions to the Integer 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/integer.rb, line 9 def self.foorth_coerce(arg) Integer(arg) rescue error "F40: Cannot coerce a #{arg.foorth_name} to an Integer instance" end
Public Instance Methods
foorth_coerce(arg)
click to toggle source
Coerce the argument to match my type.
# File lib/fOOrth/monkey_patch/integer.rb, line 16 def foorth_coerce(arg) Integer(arg) rescue error "F40: Cannot coerce a #{arg.foorth_name} to an Integer instance" end