Class: TooDoo::Arguments
- Inherits:
-
Object
- Object
- TooDoo::Arguments
- Defined in:
- lib/toodoo/arguments.rb
Overview
Arguments is intended to handle passed args and transform it into command name and its arguments I dont want to use OptionParser!
Instance Attribute Summary collapse
-
#argument ⇒ Object
readonly
Returns the value of attribute argument.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
-
#initialize(args_array = ARGV) ⇒ Arguments
constructor
A new instance of Arguments.
Constructor Details
#initialize(args_array = ARGV) ⇒ Arguments
Returns a new instance of Arguments.
10 11 12 13 14 |
# File 'lib/toodoo/arguments.rb', line 10 def initialize(args_array = ARGV) @args_array = Array(args_array) @command = recognize_command @argument = recognize_arguments end |
Instance Attribute Details
#argument ⇒ Object (readonly)
Returns the value of attribute argument.
8 9 10 |
# File 'lib/toodoo/arguments.rb', line 8 def argument @argument end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
8 9 10 |
# File 'lib/toodoo/arguments.rb', line 8 def command @command end |