Class: RubyCoded::Plugins::Base
- Inherits:
-
Object
- Object
- RubyCoded::Plugins::Base
- Defined in:
- lib/ruby_coded/plugins/base.rb
Overview
Abstract base class for all plugins. Subclass this and override the class methods to declare what your plugin contributes.
Direct Known Subclasses
Class Method Summary collapse
-
.command_descriptions ⇒ Object
Hash mapping command strings to human-readable descriptions, e.g.
-
.command_handler_extension ⇒ Object
Module to include in Chat::CommandHandler (or nil).
-
.commands ⇒ Object
Hash mapping command strings to method symbols, e.g.
-
.input_extension ⇒ Object
Module to include in Chat::InputHandler (or nil).
-
.input_handler_method ⇒ Object
Symbol — method name defined by input_extension that processes keyboard events.
-
.plugin_name ⇒ Object
Unique identifier for the plugin (Symbol).
-
.render_method ⇒ Object
Symbol — method name defined by renderer_extension that draws the plugin overlay.
-
.renderer_extension ⇒ Object
Module to include in Chat::Renderer (or nil).
-
.state_extension ⇒ Object
Module to include in Chat::State (or nil).
Class Method Details
.command_descriptions ⇒ Object
Hash mapping command strings to human-readable descriptions, e.g. { “/deploy” => “Deploy the application” }
40 |
# File 'lib/ruby_coded/plugins/base.rb', line 40 def command_descriptions = {} |
.command_handler_extension ⇒ Object
Module to include in Chat::CommandHandler (or nil).
24 |
# File 'lib/ruby_coded/plugins/base.rb', line 24 def command_handler_extension = nil |
.commands ⇒ Object
Hash mapping command strings to method symbols, e.g. { “/deploy” => :cmd_deploy }
36 |
# File 'lib/ruby_coded/plugins/base.rb', line 36 def commands = {} |
.input_extension ⇒ Object
Module to include in Chat::InputHandler (or nil).
18 |
# File 'lib/ruby_coded/plugins/base.rb', line 18 def input_extension = nil |
.input_handler_method ⇒ Object
Symbol — method name defined by input_extension that processes keyboard events. Signature: method(event) -> action_symbol | nil
28 |
# File 'lib/ruby_coded/plugins/base.rb', line 28 def input_handler_method = nil |
.plugin_name ⇒ Object
Unique identifier for the plugin (Symbol).
10 11 12 |
# File 'lib/ruby_coded/plugins/base.rb', line 10 def plugin_name raise NotImplementedError, "#{name} must implement .plugin_name" end |
.render_method ⇒ Object
Symbol — method name defined by renderer_extension that draws the plugin overlay. Signature: method(frame, chat_area, input_area)
32 |
# File 'lib/ruby_coded/plugins/base.rb', line 32 def render_method = nil |
.renderer_extension ⇒ Object
Module to include in Chat::Renderer (or nil).
21 |
# File 'lib/ruby_coded/plugins/base.rb', line 21 def renderer_extension = nil |
.state_extension ⇒ Object
Module to include in Chat::State (or nil).
15 |
# File 'lib/ruby_coded/plugins/base.rb', line 15 def state_extension = nil |