Class: L43::OptParser::Flag

Inherits:
Object
  • Object
show all
Extended by:
L43::OpenObject
Defined in:
lib/l43/opt_parser/flag.rb

Instance Method Summary collapse

Instance Method Details

#count_okObject



10
11
12
13
14
15
16
# File 'lib/l43/opt_parser/flag.rb', line 10

def count_ok
  if arg_count.zero?
    :ok
  else
    [:error, "flag #{name} cannot be set multiple times"]
  end
end

#real_nameObject

def on_multiple(&blk)

@on_multiple = blk
self

end



23
# File 'lib/l43/opt_parser/flag.rb', line 23

def real_name = as || name