Class: Cyclid::API::Plugins::Action
- Defined in:
- app/cyclid/plugins/action.rb
Overview
Base class for Action plugins
Class Method Summary collapse
-
.human_name ⇒ Object
Return the ‘human’ name for the plugin type.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Action
constructor
A new instance of Action.
-
#perform(log) ⇒ Object
Run the Action.
-
#prepare(args = {}) ⇒ Object
Provide any additional run-time data, such as the transport & context, that the plugin will require for perform() but didn’t get during initialize.
Methods inherited from Base
config?, config_schema, default_config, get_config, register_plugin, set_config, update_config
Constructor Details
#initialize(args = {}) ⇒ Action
Returns a new instance of Action.
24 25 |
# File 'app/cyclid/plugins/action.rb', line 24 def initialize(args = {}) end |
Class Method Details
.human_name ⇒ Object
Return the ‘human’ name for the plugin type
28 29 30 |
# File 'app/cyclid/plugins/action.rb', line 28 def self.human_name 'action' end |
Instance Method Details
#perform(log) ⇒ Object
Run the Action.
41 42 |
# File 'app/cyclid/plugins/action.rb', line 41 def perform(log) end |
#prepare(args = {}) ⇒ Object
Provide any additional run-time data, such as the transport & context, that the plugin will require for perform() but didn’t get during initialize.
35 36 37 38 |
# File 'app/cyclid/plugins/action.rb', line 35 def prepare(args = {}) @transport = args[:transport] @ctx = args[:ctx] end |