class

RingArea::Area

Inherits Comparable / Reference / Object

Constructors

new(area : Number)
Source

Instance methods

<=>(other : RingArea::Area)

The comparison operator. Returns 0 if the two objects are equal, a negative number if this object is considered less than other, a positive number if this object is considered greater than other, or nil if the two objects are not comparable.

Subclasses define this method to provide class-specific ordering.

The comparison operator is usually used to sort values:

# Sort in a descending way:
[3, 1, 2].sort { |x, y| y &lt;=&gt; x } # =&gt; [3, 2, 1]

# Sort in an ascending way:
[3, 1, 2].sort { |x, y| x &lt;=&gt; y } # =&gt; [1, 2, 3]
Source
area
Source
area=(area : Float32 | Float64 | Int32)
Source
to_acres
Source
to_centimeters
Source
to_centimetres
Source
to_feet
Source
to_hectares
Source
to_inches
Source
to_kilometers
Source
to_kilometres
Source
to_meters
Source
to_metres
Source
to_miles
Source
to_millimeters
Source
to_millimetres
Source
to_nauticalmiles
Source
to_yards
Source