Class: OptionParser::Switch::NoArgument

Inherits:
OptionParser::Switch show all
Defined in:
lib/llm/shell/internal/optparse/lib/optparse.rb

Overview

Switch that takes no arguments.

Instance Attribute Summary

Attributes inherited from OptionParser::Switch

#arg, #block, #conv, #desc, #long, #pattern, #short

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OptionParser::Switch

#add_banner, #compsys, guess, #initialize, #match_nonswitch?, #omitted_argument, #pretty_print, #pretty_print_contents, #summarize, #switch_name

Constructor Details

This class inherits a constructor from OptionParser::Switch

Class Method Details

.incompatible_argument_stylesObject

:nodoc:



729
730
# File 'lib/llm/shell/internal/optparse/lib/optparse.rb', line 729

def self.incompatible_argument_styles(*) # :nodoc:
end

.patternObject

:nodoc:



732
733
734
# File 'lib/llm/shell/internal/optparse/lib/optparse.rb', line 732

def self.pattern          # :nodoc:
  Object
end

Instance Method Details

#parse(arg, argv) {|NeedlessArgument, arg| ... } ⇒ Object

Raises an exception if any arguments given.

Yields:



724
725
726
727
# File 'lib/llm/shell/internal/optparse/lib/optparse.rb', line 724

def parse(arg, argv)
  yield(NeedlessArgument, arg) if arg
  conv_arg(arg)
end

#pretty_headObject

:nodoc:



736
737
738
# File 'lib/llm/shell/internal/optparse/lib/optparse.rb', line 736

def pretty_head           # :nodoc:
  "NoArgument"
end