Class: Kanal::Core::Plugins::Plugin

Inherits:
Object
  • Object
show all
Defined in:
lib/kanal/core/plugins/plugin.rb

Overview

Base class for plugins that can be registered in the core

Direct Known Subclasses

Plugins::Batteries::BatteriesPlugin

Instance Method Summary collapse

Instance Method Details

#nameSymbol

Name of the plugin, for it to be available for finding and getting

Returns:

  • (Symbol)

    <description>

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/kanal/core/plugins/plugin.rb', line 16

def name
  raise NotImplementedError
end

#rake_tasksArray<Rake::TaskLib>

If plugins does have rake tasks available for execution, require them here. They will be used

Returns:

  • (Array<Rake::TaskLib>)

    <description>



38
39
40
# File 'lib/kanal/core/plugins/plugin.rb', line 38

def rake_tasks
  []
end

#setup(core) ⇒ void

This method returns an undefined value.

This method is for the setting up, it will be executed when plugin is being added to the core

Parameters:

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/kanal/core/plugins/plugin.rb', line 28

def setup(core)
  raise NotImplementedError
end