Class: StartCommand
- Inherits:
-
Object
- Object
- StartCommand
- Defined in:
- lib/commands/start_command.rb
Instance Method Summary collapse
- #accepts_shell_command?(command) ⇒ Boolean
- #continue_test_loop? ⇒ Boolean
- #execute_from_shell(params) ⇒ Object
-
#initialize(meta_config_file, runner, view, eval_loop_commands) ⇒ StartCommand
constructor
A new instance of StartCommand.
- #start(command, file) ⇒ Object
Constructor Details
#initialize(meta_config_file, runner, view, eval_loop_commands) ⇒ StartCommand
Returns a new instance of StartCommand.
7 8 9 10 11 12 |
# File 'lib/commands/start_command.rb', line 7 def initialize , runner, view, eval_loop_commands @runner = runner @view = view @meta_file = @eval_loop_commands = eval_loop_commands end |
Instance Method Details
#accepts_shell_command?(command) ⇒ Boolean
29 30 31 |
# File 'lib/commands/start_command.rb', line 29 def accepts_shell_command? command command == 'start' end |
#continue_test_loop? ⇒ Boolean
33 34 35 |
# File 'lib/commands/start_command.rb', line 33 def continue_test_loop? true end |
#execute_from_shell(params) ⇒ Object
14 15 16 |
# File 'lib/commands/start_command.rb', line 14 def execute_from_shell params start params[1], params[2] end |
#start(command, file) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/commands/start_command.rb', line 18 def start command, file unless command then @view.show_missing_command_argument_error "start", "shell_command"; return end if file then @view.show_deprecated_command_argument_warning "start", "kata_file" end # since 30-may-2011, remove argument in later version @view.show_start_kata command, file, @meta_file.framework_property @runner.source_files = @meta_file.source_files @runner.run_command = command scheduler = Scheduler.new @runner scheduler.interrupt_listener = SchedulerInterruptListener.new @view, @eval_loop_commands scheduler.start end |