Class: GemPlugin::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_plugin.rb

Overview

This base class for plugins really 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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



260
261
262
# File 'lib/gem_plugin.rb', line 260

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



245
246
247
# File 'lib/gem_plugin.rb', line 245

def options
  @options
end

Class Method Details

.category=(category) ⇒ Object

See Mongrel::Plugin for an explanation.



256
257
258
# File 'lib/gem_plugin.rb', line 256

def Base.category=(category)
  @@category = category
end

.inherited(klass) ⇒ Object

See Mongrel::Plugin for an explanation.



249
250
251
252
253
# File 'lib/gem_plugin.rb', line 249

def Base.inherited(klass)
  name = "/" + klass.to_s.downcase
  Manager.instance.register(@@category, name, klass)
  @@category = nil
end