module Kernel

Private Instance Methods

on(flag, &block) click to toggle source
# File bin/dep, line 212
def on(flag, &block)
  if index = ARGV.index(flag)
    _ = ARGV.delete_at(index)

    case block.arity
    when 1 then block.call(ARGV.delete_at(index))
    when 0 then block.call
    else
      Dep::CLI.abort
    end
  end
end