Class: Climatic::Script::Simple

Inherits:
Object
  • Object
show all
Includes:
Base, UnimplementedProcessor
Defined in:
lib/climatic/script/simple.rb

Instance Method Summary collapse

Methods included from Base

included, #run

Methods included from Utils::ScriptHelper

#display_exit_error

Methods included from UnimplementedProcessor

#check_params, #execute

Constructor Details

#initializeSimple

Returns a new instance of Simple.



10
11
12
# File 'lib/climatic/script/simple.rb', line 10

def initialize
  register_processor
end

Instance Method Details

#register_processor(commands = cmd_line_mngr.commands, processor = self) ⇒ Object



14
15
16
17
18
19
# File 'lib/climatic/script/simple.rb', line 14

def register_processor(commands = cmd_line_mngr.commands, processor = self)
  commands = [commands] unless commands.is_a? Array
  commands.each do |command|
    cmd_line_mngr.register_processor command, processor
  end
end