Sha256: 4129fce78ccaaf3ce3b99c5a467c9055e73918d131884819b30280d62c2e5bf5

Contents?: true

Size: 999 Bytes

Versions: 9

Compression:

Stored size: 999 Bytes

Contents

# frozen_string_literal: true

require "rake"

module Kanal
  module Core
    module Plugins
      # Base class for plugins that can be registered in the core
      class Plugin
        #
        # Name of the plugin, for it to be available
        # for finding and getting
        #
        # @return [Symbol] <description>
        #
        def name
          raise NotImplementedError
        end

        #
        # This method is for the setting up, it will be executed when plugin
        # is being added to the core
        #
        # @param [Kanal::Core::Core] core <description>
        #
        # @return [void] <description>
        #
        def setup(core)
          raise NotImplementedError
        end

        #
        # If plugins does have rake tasks available for execution,
        # require them here. They will be used
        #
        # @return [Array<Rake::TaskLib>] <description>
        #
        def rake_tasks
          []
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kanal-0.8.0 lib/kanal/core/plugins/plugin.rb
kanal-0.7.0 lib/kanal/core/plugins/plugin.rb
kanal-0.6.0 lib/kanal/core/plugins/plugin.rb
kanal-0.5.1 lib/kanal/core/plugins/plugin.rb
kanal-0.5.0 lib/kanal/core/plugins/plugin.rb
kanal-0.4.3 lib/kanal/core/plugins/plugin.rb
kanal-0.4.2 lib/kanal/core/plugins/plugin.rb
kanal-0.4.1 lib/kanal/core/plugins/plugin.rb
kanal-0.4.0 lib/kanal/core/plugins/plugin.rb