Class Index [+]

Quicksearch

Ramaze::Plugin

Constants

PLUGIN_LIST
EXTS
PATH
POOL

Public Instance Methods

add_path(path) click to toggle source
    # File lib/ramaze/plugin.rb, line 38
38:     def add_path(path)
39:       PATH.unshift(File.expand_path(path))
40:       PATH.uniq!
41:     end
add_pool(pool) click to toggle source
    # File lib/ramaze/plugin.rb, line 31
31:     def add_pool(pool)
32:       POOL.unshift(pool)
33:       POOL.uniq!
34:     end
glob(name = '*') click to toggle source
    # File lib/ramaze/plugin.rb, line 61
61:     def glob(name = '*')
62:       "{#{paths.join(',')}}/plugin/#{name}.{#{EXTS.join(',')}}"
63:     end
load(name, options) click to toggle source
    # File lib/ramaze/plugin.rb, line 46
46:     def load(name, options)
47:       name = name.to_s
48:       try_require(name.snake_case)
49:       PLUGIN_LIST << [name, const_get(name.camel_case), options]
50:     rescue Exception => exception
51:       Log.error(exception)
52:       raise LoadError, "Plugin #{name} not found"
53:     end
paths() click to toggle source
    # File lib/ramaze/plugin.rb, line 65
65:     def paths
66:       PATH
67:     end
setup() click to toggle source
    # File lib/ramaze/plugin.rb, line 19
19:     def setup
20:       PLUGIN_LIST.each do |name, const, options|
21:         const.setup(options) if const.respond_to?(:setup)
22:       end
23:     end
teardown() click to toggle source
    # File lib/ramaze/plugin.rb, line 25
25:     def teardown
26:       PLUGIN_LIST.each do |name, const, options|
27:         const.teardown if const.respond_to?(:teardown)
28:       end
29:     end
try_require(name) click to toggle source
    # File lib/ramaze/plugin.rb, line 55
55:     def try_require(name)
56:       found = Dir[glob(name)].first
57:       require(File.expand_path(found)) if found
58:     rescue LoadError
59:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.