Class: Rockbox::Plugin

Inherits:
Object
  • Object
show all
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

Instance Method Details

#descriptionObject



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

#nameObject

Raises:

  • (NotImplementedError)


23
# File 'lib/rockbox/plugin.rb', line 23

def name; raise NotImplementedError; end

#uninstallObject



27
# File 'lib/rockbox/plugin.rb', line 27

def uninstall; end

#versionObject



24
# File 'lib/rockbox/plugin.rb', line 24

def version; "0.0.0"; end