Instead of using `def self.` over and over again, try:

```
class << self
  # methods here
end
```