deffinition of small inner classes should be at the bottom of class

for example: 

```Ruby
class Foo
  def  foo
    raise CustomErrorKlass
  end

  class CustomErrorKlass < StandardError; end
end
```