Method: Ark::CLI::Option#initialize

Defined in:
lib/ark/cli/option.rb

#initialize(long, short = nil, args = nil, desc = nil) ⇒ Option

Initialize a new Option instance

keys

A list of names this option will be identified by

args

A list of argument named this option will expect

desc

A short description of this option



12
13
14
15
16
17
18
19
20
# File 'lib/ark/cli/option.rb', line 12

def initialize(long, short=nil, args=nil, desc=nil)
  @long      = long
  @short     = short
  @args      = args || []
  @flag      = false
  @count     = 0
  @desc      = desc || ''
  @arg_index = 0
end