Class: Rockbox::Plugin
- Inherits:
-
Object
- Object
- Rockbox::Plugin
- Defined in:
- lib/rockbox/plugin.rb
Overview
Plugin contract — duck-typed. A plugin must respond to:
#name => String (unique)
#version => String
#install(ctx) => any (called when registered)
Optional:
#description => String
#uninstall => any (called on unregister)
Inherit from Plugin or just implement the methods directly.
Instance Method Summary collapse
- #description ⇒ Object
- #install(_context) ⇒ Object
- #name ⇒ Object
- #uninstall ⇒ Object
- #version ⇒ Object
Instance Method Details
#description ⇒ Object
25 |
# File 'lib/rockbox/plugin.rb', line 25 def description; nil; end |
#install(_context) ⇒ Object
26 |
# File 'lib/rockbox/plugin.rb', line 26 def install(_context); end |
#name ⇒ Object
23 |
# File 'lib/rockbox/plugin.rb', line 23 def name; raise NotImplementedError; end |
#uninstall ⇒ Object
27 |
# File 'lib/rockbox/plugin.rb', line 27 def uninstall; end |
#version ⇒ Object
24 |
# File 'lib/rockbox/plugin.rb', line 24 def version; "0.0.0"; end |