Class: Siba::Console
Constant Summary collapse
- UNUSED_COMMAND =
unused command for testing command line options
"unused"
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#parser ⇒ Object
Returns the value of attribute parser.
-
#test_mode ⇒ Object
Returns the value of attribute test_mode.
Instance Method Summary collapse
-
#initialize(test_mode = false) ⇒ Console
constructor
A new instance of Console.
- #parse(argv) ⇒ Object
Methods included from FilePlug
#siba_file, siba_file, siba_file=
Constructor Details
#initialize(test_mode = false) ⇒ Console
Returns a new instance of Console.
14 15 16 17 |
# File 'lib/siba/console.rb', line 14 def initialize(test_mode=false) @test_mode = test_mode @options = {} end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
12 13 14 |
# File 'lib/siba/console.rb', line 12 def @options end |
#parser ⇒ Object
Returns the value of attribute parser.
12 13 14 |
# File 'lib/siba/console.rb', line 12 def parser @parser end |
#test_mode ⇒ Object
Returns the value of attribute test_mode.
12 13 14 |
# File 'lib/siba/console.rb', line 12 def test_mode @test_mode end |
Instance Method Details
#parse(argv) ⇒ Object
19 20 21 22 23 |
# File 'lib/siba/console.rb', line 19 def parse(argv) @parser = argv return if parser.nil? parse_command argv end |