开发者

Rails.env implementation in Rails question

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜