Defining a method on the Scope