Not a fan of:

```ruby
klass = determine_type(type) or
  raise ArgumentError, "#{type.inspect} does not map to an attribute type"
```