class Rb::Boot

Public Class Methods

__instanceof(o,cl) click to toggle source
# File lib/lib/rb/boot.rb, line 19
def Boot.__instanceof(o,cl)
  return false if cl == nil
  if cl == Integer 
    return o.is_a? 0.class
  elsif cl == Float 
    return o.is_a?(Float) || o.is_a?(0.class)
  elsif cl == TrueClass 
    return ((o.is_a? TrueClass)||(o.is_a? FalseClass))
  elsif cl == String 
    return o.is_a? String
  else 
    return true if cl == Object
    return false if o == nil
    return o.is_a?(cl)
  end
end
__trace(v,i) click to toggle source

protected - in ruby this doesn't play well with static/inline methods

# File lib/lib/rb/boot.rb, line 9
def Boot.__trace(v,i)
  if i != nil 
    puts "#{v} #{i.inspect}"
  else 
    puts v
  end
end