Class: Rb::Boot
- Inherits:
-
Object
- Object
- Rb::Boot
- Defined in:
- lib/lib/rb/boot.rb
Class Method Summary collapse
- .__instanceof(o, cl) ⇒ Object
-
.__trace(v, i) ⇒ Object
protected - in ruby this doesn’t play well with static/inline methods.
Class Method Details
.__instanceof(o, cl) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# 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? Integer elsif cl == Float return o.is_a?(Float) || o.is_a?(Integer) 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) ⇒ Object
protected - in ruby this doesn’t play well with static/inline methods
9 10 11 12 13 14 15 |
# 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 |