toInt method

int toInt()

Implementation

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