is this supposed to be `@base_type ||=` ? in general this line is pretty hard for me to parse, how about using begin ... end, i.e.

``` ruby
@base_type ||= begin
  ...
end
```