Module: Enginevib::Launcher
- Included in:
- Main
- Defined in:
- lib/enginevib/launcher.rb
Overview
Defines the Launcher module which must be defined in Main.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/enginevib/launcher.rb', line 5 def @options end |
Instance Method Details
#launch ⇒ Object
7 8 9 10 11 |
# File 'lib/enginevib/launcher.rb', line 7 def launch start_scheduler rescue SystemExit, Interrupt puts 'Good bye!' # May not be printed since we are using curses. end |
#parse_arguments ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/enginevib/launcher.rb', line 13 def parse_arguments @options = { simulation_mode: true, serial_port: nil } OptionParser.new do |opts| opts. = 'Usage: enginevib [options]' on_simulation_mode(opts) on_serial_port(opts) on_help(opts) end.parse! end |