Module: Naplug::ClassMethods
- Defined in:
- lib/naplug.rb
Class Attribute Summary collapse
-
.plugins ⇒ Object
readonly
Returns the value of attribute plugins.
Class Method Summary collapse
-
.plugin(tag = :main, &block) ⇒ Plugin
Create a metaplugin (which basically contains a tag and a block).
-
.tags ⇒ Array<Symbol>
A list of plugin tags.
Class Attribute Details
.plugins ⇒ Object (readonly)
Returns the value of attribute plugins.
28 29 30 |
# File 'lib/naplug.rb', line 28 def plugins @plugins end |
Class Method Details
.plugin(tag = :main, &block) ⇒ Plugin
Create a metaplugin (which basically contains a tag and a block)
33 34 35 36 |
# File 'lib/naplug.rb', line 33 def plugin(tag = :main, &block) @plugins = Hash.new unless @plugins @plugins[tag] = tag, block end |
.tags ⇒ Array<Symbol>
A list of plugin tags
40 41 42 |
# File 'lib/naplug.rb', line 40 def self.plugins.keys end |