From 38310ab1a6f559860e25b0e28bef9560bb452ae6 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 23 Jul 2011 12:14:10 +0200 Subject: little details seen while doing a pass through what's new in docrails --- railties/lib/rails/engine.rb | 3 ++- railties/lib/rails/paths.rb | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index b5b4c2becc..cb897e94d7 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -5,7 +5,7 @@ require 'rbconfig' require 'rails/engine/railties' module Rails - # Rails::Engine allows you to wrap a specific Rails application or subset of + # Rails::Engine allows you to wrap a specific Rails application or subset of # functionality and share it with other applications. Since Rails 3.0, every # Rails::Application is just an engine, which allows for simple # feature and application sharing. @@ -176,6 +176,7 @@ module Rails # == Engine name # # There are some places where an Engine's name is used: + # # * routes: when you mount an Engine with mount(MyEngine::Engine => '/my_engine'), # it's used as default :as option # * some of the rake tasks are based on engine name, e.g. my_engine:install:migrations, diff --git a/railties/lib/rails/paths.rb b/railties/lib/rails/paths.rb index 6aecebe273..daa1bdfc29 100644 --- a/railties/lib/rails/paths.rb +++ b/railties/lib/rails/paths.rb @@ -2,7 +2,7 @@ require 'set' module Rails module Paths - # This object is an extended hash that behaves as root of the Rails::Paths system. + # This object is an extended hash that behaves as root of the Rails::Paths system. # It allows you to collect information about how you want to structure your application # paths by a Hash like API. It requires you to give a physical path on initialization. # @@ -10,13 +10,13 @@ module Rails # root.add "app/controllers", :eager_load => true # # The command above creates a new root object and add "app/controllers" as a path. - # This means we can get a Path object back like below: + # This means we can get a +Rails::Paths::Path+ object back like below: # # path = root["app/controllers"] # path.eager_load? # => true # path.is_a?(Rails::Paths::Path) # => true # - # The Path object is simply an array and allows you to easily add extra paths: + # The +Path+ object is simply an array and allows you to easily add extra paths: # # path.is_a?(Array) # => true # path.inspect # => ["app/controllers"] @@ -24,17 +24,17 @@ module Rails # path << "lib/controllers" # path.inspect # => ["app/controllers", "lib/controllers"] # - # Notice that when you add a path using #add, the path object created already - # contains the path with the same path value given to #add. In some situations, + # Notice that when you add a path using +add+, the path object created already + # contains the path with the same path value given to +add+. In some situations, # you may not want this behavior, so you can give :with as option. # # root.add "config/routes", :with => "config/routes.rb" # root["config/routes"].inspect # => ["config/routes.rb"] # - # The #add method accepts the following options as arguments: + # The +add+ method accepts the following options as arguments: # eager_load, autoload, autoload_once and glob. # - # Finally, the Path object also provides a few helpers: + # Finally, the +Path+ object also provides a few helpers: # # root = Root.new "/rails" # root.add "app/controllers" @@ -42,7 +42,7 @@ module Rails # root["app/controllers"].expanded # => ["/rails/app/controllers"] # root["app/controllers"].existent # => ["/rails/app/controllers"] # - # Check the Path documentation for more information. + # Check the Rails::Paths::Path documentation for more information. class Root < ::Hash attr_accessor :path -- cgit v1.2.3