- application
- application=
- backtrace_cleaner
- cache
- configuration
- env
- env=
- initialize!
- initialized=
- initialized?
- logger
- logger=
- public_path
- public_path=
- root
- version
[ show source ]
# File railties/lib/rails.rb, line 34
34: def application
35: @@application ||= nil
36: end
[ show source ]
# File railties/lib/rails.rb, line 38
38: def application=(application)
39: @@application = application
40: end
[ show source ]
# File railties/lib/rails.rb, line 67
67: def backtrace_cleaner
68: @@backtrace_cleaner ||= begin
69: # Relies on Active Support, so we have to lazy load to postpone definition until AS has been loaded
70: require 'rails/backtrace_cleaner'
71: Rails::BacktraceCleaner.new
72: end
73: end
The Configuration instance used to configure the Rails environment
[ show source ]
# File railties/lib/rails.rb, line 43
43: def configuration
44: application.config
45: end
[ show source ]
# File railties/lib/rails.rb, line 79
79: def env
80: @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development")
81: end
[ show source ]
# File railties/lib/rails.rb, line 83
83: def env=(environment)
84: @_env = ActiveSupport::StringInquirer.new(environment)
85: end
[ show source ]
# File railties/lib/rails.rb, line 47
47: def initialize!
48: application.initialize!
49: end
[ show source ]
# File railties/lib/rails.rb, line 55
55: def initialized=(initialized)
56: @@initialized ||= initialized
57: end
[ show source ]
# File railties/lib/rails.rb, line 51
51: def initialized?
52: @@initialized || false
53: end
[ show source ]
# File railties/lib/rails.rb, line 59
59: def logger
60: @@logger ||= nil
61: end
[ show source ]
# File railties/lib/rails.rb, line 63
63: def logger=(logger)
64: @@logger = logger
65: end
[ show source ]
# File railties/lib/rails.rb, line 95
95: def public_path
96: application && application.paths.public.to_a.first
97: end
[ show source ]
# File railties/lib/rails.rb, line 99
99: def public_path=(path)
100: ActiveSupport::Deprecation.warn "Setting Rails.public_path= is deprecated. " <<
101: "Please set paths.public = in config/application.rb instead.", caller
102: end
[ show source ]
# File railties/lib/rails.rb, line 75
75: def root
76: application && application.config.root
77: end
[ show source ]
# File railties/lib/rails.rb, line 91
91: def version
92: VERSION::STRING
93: end