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 i开发者_如何学JAVAmplementing this way? Only for lazy loading, or maybe there are other reasons?
精彩评论