Class: Mvn2::ActionTypes

Inherits:
Object
  • Object
show all
Extended by:
PluginType, TypeHelper
Defined in:
lib/mvn2/plugin.rb

Class Method Summary collapse

Class Method Details

.def_actionsObject



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/mvn2/plugin.rb', line 33

def self.def_actions
  register_type(:before_run) { |list| simple_type(list) }
  register_type(:after_run) { |list| simple_type_with_result(list) }
  register_type(:before_start) { |list| simple_type(list) }
  register_type(:after_end) { |list| simple_type_with_result(list) }
  register_type(:notification) { |list|
    options, result, cmd_clean, message_text = Plugins.get_vars :options, :result, :cmd_clean, :message_text
    list.sort_by { |v| v[:options][:order] }.each { |item| item[:block].call(options, result, cmd_clean, message_text) }
  }
  register_type(:after_notification) { |list| simple_type_with_result(list) }
end