Module: WorkflowLoader

Included in:
Radial::Radial
Defined in:
lib/core/loaders/workflow_loader.rb

Overview

Specifies the version command rubocop:disable all

Class Method Summary collapse

Class Method Details

.included(thor) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/core/loaders/workflow_loader.rb', line 7

def self.included(thor)
  thor.class_eval do
    PluginLoader.find_plugin_files("workflow").each do |plugin_file|
      require plugin_file.absolute_path
      eval("extend #{plugin_file.plugin_name}")
      eval("descf '#{plugin_file.instance_name.downcase}', '[COMMAND] [ARGS]', '#{eval("#{plugin_file.module_class_name}.help_text")}'")
      eval("thor.subcommand '#{plugin_file.instance_name.downcase}', #{plugin_file.module_class_name}")
    end
  end
end