toRat method

Rat toRat()

Implementation

Rat toRat() {
  if (this is Numeral) {
    return (this as Numeral).toRat();
  } else {
    throw ArgumentError('cant be converted to Rat: $this');
  }
}