Self Reference Type in Scala
The keyword this refers to the object instance on which the currently executing the method was invoked, or if used in a constructor, the object instance being constructed. It has the following syntax:
def lessThan(that: Rational) = this.numer * that.denom < that.numer * this.denom
this.numer refers to the numerator of the object on which less than was invoked. You can also leave off this prefix and write just
numer; the two notations are equivalent.