Module: Rails

Defined in:
lib/initializer.rb,
lib/rails/plugin.rb,
lib/rails/version.rb,
lib/rails/gem_builder.rb,
lib/rails/plugin/loader.rb,
lib/rails/gem_dependency.rb,
lib/rails/plugin/locator.rb,
lib/rails_generator/base.rb,
lib/rails_generator/spec.rb,
lib/rails_generator/options.rb,
lib/rails_generator/scripts.rb,
lib/rails_generator/commands.rb,
lib/rails_generator/manifest.rb,
lib/rails/mongrel_server/handler.rb,
lib/rails/mongrel_server/commands.rb,
lib/rails_generator/simple_logger.rb,
lib/rails_generator/generated_attribute.rb,
lib/rails_generator/secret_key_generator.rb,
lib/rails_generator/lookup.rb

Defined Under Namespace

Modules: Generator, MongrelServer, VERSION Classes: Configuration, GemBuilder, GemDependency, GemPlugin, Initializer, OrderedOptions, Plugin, SecretKeyGenerator

Class Method Summary collapse

Class Method Details

.cacheObject



43
44
45
# File 'lib/initializer.rb', line 43

def cache
  RAILS_CACHE
end

.configurationObject

The Configuration instance used to configure the Rails environment



18
19
20
# File 'lib/initializer.rb', line 18

def configuration
  @@configuration
end

.configuration=(configuration) ⇒ Object



22
23
24
# File 'lib/initializer.rb', line 22

def configuration=(configuration)
  @@configuration = configuration
end

.envObject



38
39
40
41
# File 'lib/initializer.rb', line 38

def env
  require 'active_support/string_inquirer'
  ActiveSupport::StringInquirer.new(RAILS_ENV)
end

.loggerObject



26
27
28
# File 'lib/initializer.rb', line 26

def logger
  RAILS_DEFAULT_LOGGER
end

.public_pathObject



51
52
53
# File 'lib/initializer.rb', line 51

def public_path
  @@public_path ||= self.root ? File.join(self.root, "public") : "public"
end

.public_path=(path) ⇒ Object



55
56
57
# File 'lib/initializer.rb', line 55

def public_path=(path)
  @@public_path = path
end

.rootObject



30
31
32
33
34
35
36
# File 'lib/initializer.rb', line 30

def root
  if defined?(RAILS_ROOT)
    RAILS_ROOT
  else
    nil
  end
end

.versionObject



47
48
49
# File 'lib/initializer.rb', line 47

def version
  VERSION::STRING
end