0
# The Plugin class should be an object which provides the following methods:
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
# 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
# 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
- # Returns a list of paths this plugin wishes to make available in
$LOAD_PATH0
+ # Returns a list of paths this plugin wishes to make available in
<tt>$LOAD_PATH</tt>.0
report_nonexistant_or_empty_plugin! unless valid?
0
has_lib_directory? ? [lib_path] : []
0
- # Evaluates a plugin's init.rb file
0
+ # Evaluates a plugin's init.rb file
.0
report_nonexistant_or_empty_plugin! unless valid?
Comments
No one has commented yet.