class Optimist::BooleanOption

Flag option. Has no arguments. Can be negated with “no-”.

Public Class Methods

new() click to toggle source
Calls superclass method Optimist::Option::new
# File lib/optimist.rb, line 762
def initialize
  super()
  @default = false
end

Public Instance Methods

flag?() click to toggle source
# File lib/optimist.rb, line 766
def flag? ; true ; end
parse(_paramlist, neg_given) click to toggle source
# File lib/optimist.rb, line 767
def parse(_paramlist, neg_given)
  return(self.name.to_s =~ /^no_/ ? neg_given : !neg_given)
end