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 754 def initialize super() @default = false end
Public Instance Methods
flag?()
click to toggle source
# File lib/optimist.rb, line 758 def flag? ; true ; end
parse(_paramlist, neg_given)
click to toggle source
# File lib/optimist.rb, line 759 def parse(_paramlist, neg_given) return(self.name.to_s =~ /^no_/ ? neg_given : !neg_given) end