class Trollop::BooleanOption
Flag option. Has no arguments. Can be negated with “no-”.
Public Class Methods
new()
click to toggle source
Calls superclass method
Trollop::Option::new
# File lib/trollop.rb, line 756 def initialize super() @default = false end
Public Instance Methods
flag?()
click to toggle source
# File lib/trollop.rb, line 760 def flag? ; true ; end
parse(_paramlist, neg_given)
click to toggle source
# File lib/trollop.rb, line 761 def parse(_paramlist, neg_given) return(self.name.to_s =~ /^no_/ ? neg_given : !neg_given) end