Class: Imagine::Plugin
- Inherits:
-
Object
- Object
- Imagine::Plugin
- Defined in:
- lib/imagine/plugin.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#directory ⇒ Object
Returns the value of attribute directory.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pathname ⇒ Object
Returns the value of attribute pathname.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
7 8 9 |
# File 'lib/imagine/plugin.rb', line 7 def description @description end |
#directory ⇒ Object
Returns the value of attribute directory.
6 7 8 |
# File 'lib/imagine/plugin.rb', line 6 def directory @directory end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/imagine/plugin.rb', line 6 def name @name end |
#pathname ⇒ Object
Returns the value of attribute pathname.
6 7 8 |
# File 'lib/imagine/plugin.rb', line 6 def pathname @pathname end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/imagine/plugin.rb', line 6 def version @version end |
Class Method Details
.register {|plugin = self.new| ... } ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/imagine/plugin.rb', line 9 def self.register(&block) yield(plugin = self.new) raise "A plugin MUST have a name!: #{plugin.inspect}" if plugin.name.blank? # add the new plugin to the collection of registered plugins ::Imagine::Plugins.registered << plugin end |