```ruby
require 'geo_redirect/middleware'
require 'geo_redirect/version'

module GeoRedirect

  # Load rake tasks
  require 'geo_redirect/railtie' if defined?(Rails)

end
```

Convert inline if to block
user
```ruby
require 'geo_redirect/middleware'
require 'geo_redirect/version'

module GeoRedirect

  # Load rake tasks
  if defined? Rails
    require 'geo_redirect/railtie'
  end

end
```
assistant