Class: Cyclid::API::Plugins::Action

Inherits:
Base
  • Object
show all
Defined in:
app/cyclid/plugins/action.rb

Overview

Base class for Action plugins

Direct Known Subclasses

Cobertura, Command, Email, Log, Script, Simplecov, Slack

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

author, config?, config_schema, default_config, get_config, homepage, license, metadata, register_plugin, set_config, update_config, version

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_nameObject

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