Numeric
# File mrbgems/mruby-rational/test/rational.rb, line 2 def initialize(n) @n = n end
# File mrbgems/mruby-rational/test/rational.rb, line 6 def <=>(rhs) return nil unless rhs.respond_to?(:to_i) rhs = rhs.to_i rhs < 0 ? nil : @n <=> rhs end
# File mrbgems/mruby-rational/test/rational.rb, line 12 def inspect "#{self.class}(#{@n})" end
This page was generated for Ruby mruby
Ruby-doc.org is a service of James Britt and Neurogami, an erratic source of art, music, and technology.
Generated with Ruby-doc Rdoc Generator 0.44.0.