You can shorten this using `||=`. `var ||= 123` is basically the same as `var = var || 123`.

```ruby
def self.adapter
  @@adapter ||=
    begin
      raise 'Please call Lhm.setup' unless defined?(ActiveRecord)
      ActiveRecord::Base.connection
    end
end
```