Comparable
ruby/spec describes 7 methods in core/comparable, and Metorex implements 7 of them. The parameters are what Method#parameters answers under Metorex.
Comparable#<: implemented, parameters[[:req]]. Returns whetherselfis "less than"other; equivalent to(self <=> other) < 0:Comparable#<=: implemented, parameters[[:req]]. Returns whetherselfis "less than or equal to"other; equivalent to(self <=> other) <= 0:Comparable#==: implemented, parameters[[:req]]. Compares two objects based on the receiver's<=>method, returning true if it returns 0.Comparable#>: implemented, parameters[[:req]]. Compares two objects based on the receiver's<=>method, returning true if it returns a value greater than 0.Comparable#>=: implemented, parameters[[:req]]. Compares two objects based on the receiver's<=>method, returning true if it returns a value greater than or equal to 0.Comparable#between?: implemented, parameters[[:req], [:req]]. Returnsfalseif obj<=>min is less than zero or if obj<=>max is greater than zero,trueotherwise. An example calling it.Comparable#clamp: implemented, parameters[[:rest]]. In(min, max)form, returns min if obj<=>min is less than zero, max if obj<=>max is greater than zero, and obj otherwise. An example calling it.
The method summaries are the first sentences of Ruby's own documentation for each method, read from MRI 4.0.6's ri data. Ruby's documentation is distributed under Ruby's license.