Class: Matrixeval::Runner
- Inherits:
-
Object
- Object
- Matrixeval::Runner
- Defined in:
- lib/matrixeval/runner.rb
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Runner
constructor
A new instance of Runner.
- #start ⇒ Object
Constructor Details
#initialize(argv) ⇒ Runner
15 16 17 18 19 20 |
# File 'lib/matrixeval/runner.rb', line 15 def initialize(argv) @argv = argv @command = CommandLine.new(argv) @threads ||= [] @matrixeval_results ||= [] end |
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
13 14 15 |
# File 'lib/matrixeval/runner.rb', line 13 def argv @argv end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
13 14 15 |
# File 'lib/matrixeval/runner.rb', line 13 def command @command end |
Class Method Details
.start(argv) ⇒ Object
8 9 10 |
# File 'lib/matrixeval/runner.rb', line 8 def start(argv) new(argv).start end |
Instance Method Details
#start ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/matrixeval/runner.rb', line 22 def start load_plugin validates if command.init? init elsif command.all? run_all_contexts else run_a_specific_context end rescue OptionParser::InvalidOption => e puts " \#{e.message}\n See 'matrixeval --help'\n ERROR\n exit\nrescue Config::YAML::MissingError\n puts \"Please run 'matrixeval init' first to generate matrixeval.yml\"\n puts \"See 'matrixeval init -h'\"\n exit\nensure\n turn_on_stty_opost\nend\n" |