class TooDoo::Arguments
Arguments
is intended to handle passed args and transform it into command name and its arguments I dont want to use OptionParser!
Attributes
argument[R]
command[R]
Public Class Methods
new(args_array = ARGV)
click to toggle source
# File lib/toodoo/arguments.rb, line 10 def initialize(args_array = ARGV) @args_array = Array(args_array) @command = recognize_command @argument = recognize_arguments end
Private Instance Methods
recognize_arguments()
click to toggle source
# File lib/toodoo/arguments.rb, line 22 def recognize_arguments @args_array end
recognize_command()
click to toggle source
# File lib/toodoo/arguments.rb, line 18 def recognize_command @args_array.shift || :command_missing end