views:

13

answers:

0

Hi, 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?