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(*tagmeta, &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.
26 27 28 |
# File 'lib/naplug.rb', line 26 def plugins @plugins end |
Class Method Details
.plugin(*tagmeta, &block) ⇒ Plugin
Create a metaplugin (which basically contains a tag and a block)
31 32 33 34 35 |
# File 'lib/naplug.rb', line 31 def plugin(*, &block) tag, = @plugins = Hash.new unless @plugins @plugins[tag] = tag, , block end |
.tags ⇒ Array<Symbol>
A list of plugin tags
39 40 41 |
# File 'lib/naplug.rb', line 39 def self.plugins.keys end |