Method: Decko::Commands::Command#split_args

Defined in:
lib/decko/commands/command.rb

#split_args(args) ⇒ Object

split special decko args and original command args separated by ‘–’



15
16
17
18
19
20
21
22
23
# File 'lib/decko/commands/command.rb', line 15

def split_args args
  before_split = true
  decko_args, command_args =
    args.partition do |a|
      before_split = (a == "--" ? false : before_split)
    end
  command_args.shift
  [decko_args, command_args]
end