class OptimistXL::StringFlagOption

Public Class Methods

new() click to toggle source
Calls superclass method OptimistXL::Option::new
# File lib/optimist_xl.rb, line 1224
def initialize
  super
  @default = false
  @min_args = 0
  @max_args = 1
end

Public Instance Methods

compatible_with?(other_option) click to toggle source
# File lib/optimist_xl.rb, line 1231
def compatible_with?(other_option)
  self.is_a?(other_option.class) ||
    other_option.is_a?(BooleanOption) ||
    other_option.is_a?(StringArrayOption)
end
parse(paramlist, neg_given) click to toggle source
# File lib/optimist_xl.rb, line 1211
def parse(paramlist, neg_given)
  paramlist.map do |plist|
    plist.map do |pg|
      neg_given ? false : pg
      #case pg
      #when FalseClass then () ? neg_given : !neg_given
      #when TrueClass then (self.name.to_s =~ /^no_/) ? neg_given : !neg_given
      #else pg
      #end
    end
  end
end
type_format() click to toggle source
# File lib/optimist_xl.rb, line 1210
def type_format ; "=<s?>" ; end