class Luban::CLI::NegatableSwitch

Public Instance Methods

kind() click to toggle source
# File lib/luban/cli/base/switch.rb, line 28
def kind; @kind ||= "negatable switch"; end

Protected Instance Methods

build_default_str() click to toggle source
# File lib/luban/cli/base/switch.rb, line 32
def build_default_str
  @config[:default] ? "--#{long_opt_name}" : "--no-#{long_opt_name}"
end
build_long_option() click to toggle source
# File lib/luban/cli/base/switch.rb, line 36
def build_long_option
  "--[no-]#{long_opt_name}"
end