Namespace
Methods
A
B
C
E
G
I
L
P
R
V
Class Public methods
application()
# File railties/lib/rails.rb, line 36
def application
  @@application ||= nil
end
application=(application)
# File railties/lib/rails.rb, line 40
def application=(application)
  @@application = application
end
backtrace_cleaner()
# File railties/lib/rails.rb, line 69
def backtrace_cleaner
  @@backtrace_cleaner ||= begin
    # Relies on Active Support, so we have to lazy load to postpone definition until AS has been loaded
    require 'rails/backtrace_cleaner'
    Rails::BacktraceCleaner.new
  end
end
cache()
# File railties/lib/rails.rb, line 89
def cache
  RAILS_CACHE
end
configuration()

The Configuration instance used to configure the Rails environment

# File railties/lib/rails.rb, line 45
def configuration
  application.config
end
env()
# File actionpack/test/abstract_unit.rb, line 43
def env
  @_env ||= ActiveSupport::StringInquirer.new(ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "test")
end
env=(environment)
# File railties/lib/rails.rb, line 85
def env=(environment)
  @_env = ActiveSupport::StringInquirer.new(environment)
end
groups(*groups)

Returns all rails groups for loading based on:

  • The Rails environment;

  • The environment variable RAILS_GROUPS;

  • The optional envs given as argument and the hash with group dependencies;

Examples

groups :assets => [:development, :test]

# Returns
# => [:default, :development, :assets] for Rails.env == "development"
# => [:default, :production]           for Rails.env == "production"
# File railties/lib/rails.rb, line 107
def groups(*groups)
  hash = groups.extract_options!
  env = Rails.env
  groups.unshift(:default, env)
  groups.concat ENV["RAILS_GROUPS"].to_s.split(",")
  groups.concat hash.map { |k,v| k if v.map(&:to_s).include?(env) }
  groups.compact!
  groups.uniq!
  groups
end
initialize!()
# File railties/lib/rails.rb, line 49
def initialize!
  application.initialize!
end
initialized=(initialized)
# File railties/lib/rails.rb, line 57
def initialized=(initialized)
  @@initialized ||= initialized
end
initialized?()
# File railties/lib/rails.rb, line 53
def initialized?
  @@initialized || false
end
logger()
# File railties/lib/rails.rb, line 61
def logger
  @@logger ||= nil
end
logger=(logger)
# File railties/lib/rails.rb, line 65
def logger=(logger)
  @@logger = logger
end
public_path()
# File railties/lib/rails.rb, line 122
def public_path
  application && application.paths["public"].first
end
root()
# File railties/lib/rails.rb, line 77
def root
  application && application.config.root
end
version()
# File railties/lib/rails.rb, line 118
def version
  VERSION::STRING
end