Class: Mirah::Commands::Run

Inherits:
Base
  • Object
show all
Defined in:
lib/mirah/commands/run.rb

Constant Summary

Constants included from Logging::Logged

Logging::Logged::VLEVELS

Instance Attribute Summary

Attributes inherited from Base

#args, #argument_processor, #state

Instance Method Summary collapse

Methods inherited from Base

#execute_base, #initialize

Methods included from Logging::Logged

#error, #info, #log, #logger, #logger_name, #logging?, #vlog, #warning

Constructor Details

This class inherits a constructor from Mirah::Commands::Base

Instance Method Details

#command_nameObject



34
35
36
# File 'lib/mirah/commands/run.rb', line 34

def command_name
  :run
end

#executeObject



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/mirah/commands/run.rb', line 22

def execute
  execute_base do
    class_map = generate_classes
    $CLASSPATH << Mirah::Env.decode_paths(@state.classpath) if @state.classpath
    class_loader = load_classes class_map

    main = find_main class_map, class_loader

    run_main(main)
  end
end