Class: Kerplutz::Switch

Inherits:
Option
  • Object
show all
Defined in:
lib/kerplutz/options.rb

Instance Attribute Summary

Attributes inherited from Option

#abbrev, #desc, #name

Instance Method Summary collapse

Methods inherited from Option

#abbrev_sig, build, #display_name, #initialize, #parser_args

Constructor Details

This class inherits a constructor from Kerplutz::Option

Instance Method Details

#configure(parser, &blk) ⇒ Object



83
84
85
86
87
# File 'lib/kerplutz/options.rb', line 83

def configure(parser, &blk)
  parser.on(*parser_args) do |arg|
    blk.call(arg)
  end
end

#option_sigObject



79
80
81
# File 'lib/kerplutz/options.rb', line 79

def option_sig
  "--[no-]#{display_name}"
end