1

browsing rails source, I found in railties/lib/initializers.rb such method

def env
  @_env ||= begin
    require 'active_support/string_inquirer'
    ActiveSupport::StringInquirer.new(RAILS_ENV)
  end
end

I know how it works, but why it is implementing this way? Only for lazy loading, or maybe there are other reasons?

Sławosz
  • 11,187
  • 15
  • 73
  • 106

0 Answers0