Module: ShellOpts
- Defined in:
- lib/shellopts/program.rb,
lib/shellopts.rb,
lib/shellopts/ansi.rb,
lib/shellopts/args.rb,
lib/shellopts/dump.rb,
lib/shellopts/lexer.rb,
lib/shellopts/stack.rb,
lib/shellopts/token.rb,
lib/shellopts/parser.rb,
lib/shellopts/grammar.rb,
lib/shellopts/version.rb,
lib/shellopts/analyzer.rb,
lib/shellopts/renderer.rb,
lib/shellopts/formatter.rb,
lib/shellopts/interpreter.rb,
lib/shellopts/argument_type.rb
Overview
Option rendering
-a, --all
--all
-a
Option group rendering
-a, --all -b, --beta
--all --beta
-a -b
-a, --all
-b, --beta
Command rendering
cmd --all --beta [cmd1|cmd2] ARG1 ARG2
cmd --all --beta [cmd1|cmd2] ARGS...
cmd -a -b [cmd1|cmd2] ARG1 ARG2
cmd -a -b [cmd1|cmd2] ARGS...
cmd -a -b [cmd1|cmd2] ARG1 ARG2
cmd -a -b [cmd1|cmd2] ARG3 ARG4
cmd --all --beta
[cmd1|cmd2] ARG1 ARG2
cmd --all --beta
<commands> ARGS
Defined Under Namespace
Modules: ErrorHandling, Grammar, Messages, Stack
Classes: Analyzer, AnalyzerError, Ansi, Args, Command, CompilerError, Error, Failure, Formatter, InternalError, Interpreter, Lexer, LexerError, Line, Option, Parser, ParserError, Program, ShellOpts, ShellOptsError, Token
Constant Summary
collapse
- VERSION =
"2.0.5"
Class Method Summary
collapse
Class Method Details
.instance ⇒ Object
332
|
# File 'lib/shellopts.rb', line 332
def self.instance() @instance or raise Error, "ShellOpts is not initialized" end
|
.instance=(instance) ⇒ Object
333
|
# File 'lib/shellopts.rb', line 333
def self.instance=(instance) @instance = instance end
|
.instance? ⇒ Boolean
331
|
# File 'lib/shellopts.rb', line 331
def self.instance?() !@instance.nil? end
|
.process(spec, argv, msgopts: false, **opts) ⇒ Object
325
326
327
328
|
# File 'lib/shellopts.rb', line 325
def self.process(spec, argv, msgopts: false, **opts)
msgopts ||= Messages.is_included?
ShellOpts.process(spec, argv, msgopts: msgopts, **opts)
end
|
.shellopts ⇒ Object
334
|
# File 'lib/shellopts.rb', line 334
def self.shellopts() instance end
|