Class: Mongrel::PluginBase
- Inherits:
-
Object
- Object
- Mongrel::PluginBase
- Defined in:
- lib/mongrel/plugins.rb
Overview
This base class for plugins reallys does nothing more than wire up the new class into the right category. It is not thread-safe yet but will be soon.
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
-
.category=(category) ⇒ Object
See Mongrel::Plugin for an explanation.
-
.inherited(klass) ⇒ Object
See Mongrel::Plugin for an explanation.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PluginBase
constructor
A new instance of PluginBase.
Constructor Details
#initialize(options = {}) ⇒ PluginBase
Returns a new instance of PluginBase.
129 130 131 |
# File 'lib/mongrel/plugins.rb', line 129 def initialize( = {}) @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
114 115 116 |
# File 'lib/mongrel/plugins.rb', line 114 def @options end |
Class Method Details
.category=(category) ⇒ Object
See Mongrel::Plugin for an explanation.
125 126 127 |
# File 'lib/mongrel/plugins.rb', line 125 def PluginBase.category=(category) @@category = category end |
.inherited(klass) ⇒ Object
See Mongrel::Plugin for an explanation.
118 119 120 121 122 |
# File 'lib/mongrel/plugins.rb', line 118 def PluginBase.inherited(klass) name = "/" + klass.to_s.downcase PluginManager.instance.register(@@category, name, klass) @@category = nil end |