public
Description: PLEASE CHECK http://github.com/lifo/docrails/wikis
Homepage: http://weblog.rubyonrails.org/2008/5/2/help-improve-rails-documentation-on-git-branch
Clone URL: git://github.com/lifo/docrails.git
revised conventions in rails/plugin.rb
fxn (author)
Tue May 06 16:50:55 -0700 2008
commit  ec1963a56748dcca1e91106302547105522648c1
tree    f9bc1aa9c9b43876bf2b265d8f83d7feb38f888f
parent  dc09a768c2e6f07475489bda9b5548fa115619f8
...
1
2
3
4
5
6
7
8
 
 
 
 
 
9
10
11
 
12
13
14
...
31
32
33
34
 
35
36
37
38
39
40
 
41
42
43
...
1
2
3
 
 
 
 
 
4
5
6
7
8
9
10
 
11
12
13
14
...
31
32
33
 
34
35
36
37
38
39
 
40
41
42
43
0
@@ -1,14 +1,14 @@
0
 module Rails
0
   # The Plugin class should be an object which provides the following methods:
0
   #
0
- # * +name+ - used during initialisation to order the plugin (based on name and
0
- # the contents of <tt>config.plugins</tt>)
0
- # * +valid?+ - returns true if this plugin can be loaded
0
- # * +load_paths+ - each path within the returned array will be added to the $LOAD_PATH
0
- # * +load+ - finally 'load' the plugin.
0
+ # * +name+ - Used during initialisation to order the plugin (based on name and
0
+ # the contents of <tt>config.plugins</tt>).
0
+ # * +valid?+ - Returns true if this plugin can be loaded.
0
+ # * +load_paths+ - Each path within the returned array will be added to the <tt>$LOAD_PATH</tt>.
0
+ # * +load+ - Finally 'load' the plugin.
0
   #
0
   # These methods are expected by the Rails::Plugin::Locator and Rails::Plugin::Loader classes.
0
- # The default implementation returns the <tt>lib</tt> directory as its </tt>load_paths</tt>,
0
+ # The default implementation returns the <tt>lib</tt> directory as its <tt>load_paths</tt>,
0
   # and evaluates <tt>init.rb</tt> when <tt>load</tt> is called.
0
   #
0
   # You can also inspect the about.yml data programmatically:
0
@@ -31,13 +31,13 @@ module Rails
0
       File.directory?(directory) && (has_lib_directory? || has_init_file?)
0
     end
0
   
0
- # Returns a list of paths this plugin wishes to make available in $LOAD_PATH
0
+ # Returns a list of paths this plugin wishes to make available in <tt>$LOAD_PATH</tt>.
0
     def load_paths
0
       report_nonexistant_or_empty_plugin! unless valid?
0
       has_lib_directory? ? [lib_path] : []
0
     end
0
 
0
- # Evaluates a plugin's init.rb file
0
+ # Evaluates a plugin's init.rb file.
0
     def load(initializer)
0
       return if loaded?
0
       report_nonexistant_or_empty_plugin! unless valid?

Comments

    No one has commented yet.