Committing before test
This commit is contained in:
@@ -0,0 +1,76 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run all specs
|
||||||
|
crystal spec
|
||||||
|
|
||||||
|
# Run a single spec file
|
||||||
|
crystal spec spec/command_spec.cr
|
||||||
|
|
||||||
|
# Type-check without running
|
||||||
|
crystal build src/cligen.cr --no-codegen
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
shards install
|
||||||
|
```
|
||||||
|
|
||||||
|
## What This Is
|
||||||
|
|
||||||
|
`cligen` is a Crystal **shard (library)** — not a standalone application. It wraps Crystal's built-in `OptionParser` with an annotation- and macro-driven system that auto-generates CLI parsers from class definitions. Users of the shard subclass `CliGen::Command` and annotate methods; the library generates the `OptionParser` wiring at compile time via Crystal macros.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Entry point: `src/cligen.cr`
|
||||||
|
|
||||||
|
Defines the `CliGen` module. The `macro finished` hook calls `define_root_parser`, which scans all `CliGen::Command` subclasses at compile time and registers each as a subcommand on the root `OptionParser`. `CliGen.parse` runs the root parser.
|
||||||
|
|
||||||
|
`ADDITIONAL_DEFAULT_FLAGS` / `add_default_flag` let users inject extra flags into every parser (root and subcommand).
|
||||||
|
|
||||||
|
### Command definition: `src/cligen/command.cr`
|
||||||
|
|
||||||
|
`CliGen::Command` is the base class. When subclassed, `macro inherited` installs a `macro finished` block that triggers four code-generation macros in order:
|
||||||
|
|
||||||
|
1. `define_actions` — collects all `@[SubCommand]`-annotated class methods into `ACTIONS : Array(String)` and `@@action : String`.
|
||||||
|
2. `define_header` — builds the `HEADER` string (banner + examples) from `@[SubCommand]` and `@[CommandSelection]` annotation metadata.
|
||||||
|
3. `define_runner` (skipped if `@[CommandInfo(def_runner: false)]`) — generates a `self.run` method that dispatches on `@@action` or a selection variable via a `case` statement.
|
||||||
|
4. `define_action_setter` — generates `self.action=` with bounds-checking against `ACTIONS`.
|
||||||
|
|
||||||
|
#### Key macros on `Command`
|
||||||
|
|
||||||
|
- **`define_argument`** — declares a class-level variable (`@@`) and an annotated setter method (`@[CommandArgument]`). Handles `String`, `Bool`, `Int32`, `Array(String|Int32)`, and `Time`. Optional `check:` proc, `logger:` method, and `def_getter:` flag.
|
||||||
|
- **`define_selection`** — like `define_argument` but validates against a fixed list of values; annotated with `@[CommandArgument]` and participates in selection-based dispatch.
|
||||||
|
|
||||||
|
### Parser generation: `src/cligen/command/parser.cr`
|
||||||
|
|
||||||
|
`CliGen::Parser` is `extend`ed by `Command`. It provides `define_parser`, which generates `self.make_parser(parent_parser)`. That method:
|
||||||
|
|
||||||
|
1. Creates a subparser `OptionParser` with the command's `HEADER` as banner.
|
||||||
|
2. Wires `@[CommandSelection]`-annotated methods as `parser.on(name, description)` that set the selection variable.
|
||||||
|
3. Wires `@[SubCommand]`-annotated methods as subcommand strings that set `@@action`.
|
||||||
|
4. Wires `@[CommandArgument]`-annotated methods as `parser.on(short, long, description)` flag handlers.
|
||||||
|
5. Calls `CliGen.define_default_flags` (adds `-h`/`--help`, error handlers).
|
||||||
|
6. Registers the whole subparser on `parent_parser` under the command's lowercase class name.
|
||||||
|
|
||||||
|
### Annotations
|
||||||
|
|
||||||
|
| Annotation | Applied to | Purpose |
|
||||||
|
|---|---|---|
|
||||||
|
| `@[CommandInfo(description:, def_runner:)]` | Command subclass | Required; provides the description shown in root help; `def_runner: false` skips auto-generating `run` |
|
||||||
|
| `@[SubCommand(description:, examples:)]` | class method on Command | Marks a method as a dispatachable subcommand |
|
||||||
|
| `@[CommandArgument(short:, long:, description:, type:)]` | class method on Command | Generated automatically by `define_argument`/`define_selection`; drives parser wiring |
|
||||||
|
| `@[CommandSelection(selector:, description:, examples:)]` | class method on Command | Alternative to `SubCommand`; dispatches via a named selector variable instead of `@@action` |
|
||||||
|
| `@[CommandPreRun]` | class method on Command | Methods run unconditionally before dispatch inside `self.run` |
|
||||||
|
| `@[DefaultFlag]` | (reserved) | Defined but not currently used in generation |
|
||||||
|
|
||||||
|
### Supporting files
|
||||||
|
|
||||||
|
- `src/cligen/format.cr` — date/datetime format strings used by `Time` argument parsing.
|
||||||
|
- `src/cligen/regex.cr` — regexes for validating date/datetime input strings.
|
||||||
|
|
||||||
|
## Spec structure
|
||||||
|
|
||||||
|
`spec/command_spec.cr` uses Crystal's macro system heavily: most `it` blocks are generated at compile time by inspecting `CommandSubclass` via `@type` introspection. The `macro finished` wrapper around the entire `describe` block is required because `make_parser` and `run` don't exist until all `macro finished` hooks have fired.
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
DOC_DIR := docs
|
||||||
|
PROJECT_NAME := CliGenerator
|
||||||
|
.DEFAULT_GOAL := spec
|
||||||
|
|
||||||
|
.PHONY: spec spec_silent doc doc_show
|
||||||
|
.SILENT: spec spec_silent doc doc_show
|
||||||
|
|
||||||
|
.DEFAULT:
|
||||||
|
@echo "BRUV "$@" isn't a valid target"
|
||||||
|
|
||||||
|
spec:
|
||||||
|
crystal spec -v
|
||||||
|
|
||||||
|
spec_silent:
|
||||||
|
crystal spec
|
||||||
|
|
||||||
|
doc:
|
||||||
|
crystal doc --project-name "$(PROJECT_NAME)" --output "$(DOC_DIR)"
|
||||||
|
echo "Done Generating docs"
|
||||||
|
|
||||||
|
doc_show:
|
||||||
|
cd "$(DOC_DIR)"; python -m http.server
|
||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
= Crytal Cli Generator
|
||||||
|
|
||||||
|
:author: Tristan Anclelet
|
||||||
|
:email: tristanancelet@yahoo.com
|
||||||
|
:toc:
|
||||||
|
|
||||||
|
This document outlines the overall design of the CliGen shard & it's underlying classes/objects & their usecases.
|
||||||
|
|
||||||
|
== Architecture
|
||||||
|
|
||||||
|
The desire for this project is to provide a framework for generating commandline arg-parses & command dispatch built into a class/object.
|
||||||
|
|
||||||
|
The idea is to (much like `JSON::Serializable` & `YAML::Serializable`) is to use macros to help defining a Command object and abstract the command-line away from the codebase needing input from the user at init time.
|
||||||
|
|
||||||
|
=== Command Objects
|
||||||
|
|
||||||
|
The core of this codebase is the `CliGen::Command` object.
|
||||||
|
|
||||||
|
This is the object that is meant to provide you the hook into being able to utilize the codebase. It is where you are able to define all of your expecetd arguments/flags & any selectables (aka, instance variable that you want the user to choose one value for. `ex: -f|--format json|yaml|ecr`).
|
||||||
|
|
||||||
|
To make this all possible we load the base class with macros that help define your variables & inform the framework how it needs to handle arguments being presented to your command object setters.
|
||||||
|
|
||||||
|
[source,crystal]
|
||||||
|
----
|
||||||
|
require "cligen"
|
||||||
|
|
||||||
|
module MyModule
|
||||||
|
class MyCommand < CliGen::Command
|
||||||
|
argument(myvar : Int32 = 23,
|
||||||
|
long: "--myvar VAR",
|
||||||
|
short: "-m",
|
||||||
|
description: "This tells the utility how many times to do thing",
|
||||||
|
validate: ->(v : Int32) : Bool { (1..23).includes?(v) }
|
||||||
|
)
|
||||||
|
|
||||||
|
selection(output_format : String = "ecr",
|
||||||
|
long: "--format FORMAT",
|
||||||
|
short: "-f",
|
||||||
|
description: "Inform the utility what output you want the data in",
|
||||||
|
options: %w[ json yaml ecr ]
|
||||||
|
)
|
||||||
|
|
||||||
|
DO_THING_EXAMPLES = [
|
||||||
|
"myutil mycommand do_thing --myvar 5"
|
||||||
|
]
|
||||||
|
|
||||||
|
subcommand do_thing : Int32,
|
||||||
|
description: "Do the THING",
|
||||||
|
examples: MyModule::MyCommand::DO_THING_EXAMPLES \
|
||||||
|
do
|
||||||
|
output = 0
|
||||||
|
|
||||||
|
@myvar.times do |i|
|
||||||
|
puts "thing done %i times" % [ i + 1 ]
|
||||||
|
output += i
|
||||||
|
end
|
||||||
|
|
||||||
|
output
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
CliGen::App.process(ARGV)
|
||||||
|
end
|
||||||
|
----
|
||||||
|
|
||||||
|
The examples like above provide a "DSL-esk" way of defining:
|
||||||
|
- Instance Variables,
|
||||||
|
- Short/Long flags
|
||||||
|
- Description of the flags (used in the help output as well)
|
||||||
|
- A verification proc/lambda for doing ad-hoc checks of the value provided by the user (essentially allowing you to implement your own option: key like in selection)
|
||||||
|
- Selections (currently compile-time and will open it up to runtime collecting of options later on based on defined annotations in the class)
|
||||||
|
- define subcommands of this current command
|
||||||
|
|
||||||
|
==== How it works
|
||||||
|
|
||||||
|
Using crystal macros, you define the shape (arguments/flags, selections, work functions/subcommands, etc
|
||||||
+177
@@ -0,0 +1,177 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent " data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
404 Not Found
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This page is unavailable in this version of the API docs.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You can use the sidebar to search for your page, or try a different
|
||||||
|
Crystal version.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,363 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
module
|
||||||
|
</span> CliGen
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/annotations.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/app.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/arg.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command/argument.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command/selection.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command/subcommand.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command/trigger.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command_node.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/flag.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/generate.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/match_type.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constant-summary" class="anchor" href="#constant-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constant Summary
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
|
||||||
|
<dt class="entry-const" id="ADDITIONAL_DEFAULT_FLAGS">
|
||||||
|
<strong>ADDITIONAL_DEFAULT_FLAGS</strong> = <code><span class="o">[]</span> <span class="k">of</span> <span class="t">AdditionalDefaultFlag</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="APPNAME">
|
||||||
|
<strong>APPNAME</strong> = <code><span class="t">File</span>.basename(<span class="t">PROGRAM_NAME</span>)</code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="VERSION">
|
||||||
|
<strong>VERSION</strong> = <code><span class="s">"0.1.0"</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="class-method-summary" class="anchor" href="#class-method-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Class Method Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#add_default_flag%28short%3AString%3D%22%22%2Clong%3AString%3D%22%22%2Cdescription%3AString%3D%22%22%2C%26work%3AString-%3E%29-class-method" class="signature"><strong>.add_default_flag</strong>(short : String = <span class="s">""</span>, long : String = <span class="s">""</span>, description : String = <span class="s">""</span>, &work : String -> )</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="class-method-detail" class="anchor" href="#class-method-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Class Method Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="add_default_flag(short:String="",long:String="",description:String="",&work:String->)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>add_default_flag</strong>(short : String = <span class="s">""</span>, long : String = <span class="s">""</span>, description : String = <span class="s">""</span>, &work : String -> )
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#add_default_flag%28short%3AString%3D%22%22%2Clong%3AString%3D%22%22%2Cdescription%3AString%3D%22%22%2C%26work%3AString-%3E%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,451 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::AdditionalDefaultFlag - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
struct
|
||||||
|
</span> CliGen::<wbr>AdditionalDefaultFlag
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="superclass-hierarchy"><li class="superclass"><a href="../CliGen/AdditionalDefaultFlag.html">CliGen::AdditionalDefaultFlag</a></li><li class="superclass">Struct</li><li class="superclass">Value</li><li class="superclass">Object</li></ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructors" class="anchor" href="#constructors">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructors
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#new%28short%3AString%2Clong%3AString%2Cdescription%3AString%2Cwork%3AString-%3E%29-class-method" class="signature"><strong>.new</strong>(short : String, long : String, description : String, work : String -> )</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-summary" class="anchor" href="#instance-method-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#clone-instance-method" class="signature"><strong>#clone</strong></a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#copy_with%28short_short%3D%40short%2Clong_long%3D%40long%2Cdescription_description%3D%40description%2Cwork_work%3D%40work%29-instance-method" class="signature"><strong>#copy_with</strong>(short _short = @short, long _long = @long, description _description = @description, work _work = @work)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#description%3AString-instance-method" class="signature"><strong>#description</strong> : String</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#long%3AString-instance-method" class="signature"><strong>#long</strong> : String</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#short%3AString-instance-method" class="signature"><strong>#short</strong> : String</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#work%3AString-%3E-instance-method" class="signature"><strong>#work</strong> : String -> </a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructor-detail" class="anchor" href="#constructor-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructor Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="new(short:String,long:String,description:String,work:String->)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>new</strong>(short : String, long : String, description : String, work : String -> )
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#new%28short%3AString%2Clong%3AString%2Cdescription%3AString%2Cwork%3AString-%3E%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-detail" class="anchor" href="#instance-method-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="clone-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>clone</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#clone-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="copy_with(short_short=@short,long_long=@long,description_description=@description,work_work=@work)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>copy_with</strong>(short _short = @short, long _long = @long, description _description = @description, work _work = @work)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#copy_with%28short_short%3D%40short%2Clong_long%3D%40long%2Cdescription_description%3D%40description%2Cwork_work%3D%40work%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="description:String-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>description</strong> : String
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#description%3AString-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="long:String-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>long</strong> : String
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#long%3AString-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="short:String-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>short</strong> : String
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#short%3AString-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="work:String->-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>work</strong> : String ->
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#work%3AString-%3E-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,451 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::App - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
class
|
||||||
|
</span> CliGen::<wbr>App
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="superclass-hierarchy"><li class="superclass"><a href="../CliGen/App.html">CliGen::App</a></li><li class="superclass"><a href="../CliGen/CommandNode.html">CliGen::CommandNode</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="overview" class="anchor" href="#overview">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Overview
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p>This serves as the default App object, that holds a copy of all flags &
|
||||||
|
handles flag processing until it hands off to the user defined commands</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/app.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructors" class="anchor" href="#constructors">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructors
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#new%28name%2Cflags%2Ccommands%2Cpre_run_commands%2Cpost_run_commands%29-class-method" class="signature"><strong>.new</strong>(name, flags, commands, pre_run_commands, post_run_commands)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="class-method-summary" class="anchor" href="#class-method-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Class Method Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#process%28args%3AArray%28String%29%3DARGV%29-class-method" class="signature"><strong>.process</strong>(args : Array(String) = <span class="t">ARGV</span>)</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Serves as a convinence method for the user to call to begin processing an argument array provided by the user.</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-summary" class="anchor" href="#instance-method-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#check%21-instance-method" class="signature"><strong>#check!</strong></a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Instance methods inherited from class <code><a href="../CliGen/CommandNode.html">CliGen::CommandNode</a></code></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/CommandNode.html#check%21-instance-method" class="tooltip">
|
||||||
|
<span>check!</span>
|
||||||
|
check!</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/CommandNode.html#check_for_duplicates%21%28flags%3AArray%28BaseFlag%29%29-instance-method" class="tooltip">
|
||||||
|
<span>check_for_duplicates!(flags : Array(BaseFlag))</span>
|
||||||
|
check_for_duplicates!</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/CommandNode.html#find_match%28arg%3AString%29-instance-method" class="tooltip">
|
||||||
|
<span>find_match(arg : String)</span>
|
||||||
|
find_match</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/CommandNode.html#process%28args%3AArray%28String%29%29-instance-method" class="tooltip">
|
||||||
|
<span>process(args : Array(String))<br/>process(args : Array(Arg)) : Nil</span>
|
||||||
|
process</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Constructor methods inherited from class <code><a href="../CliGen/CommandNode.html">CliGen::CommandNode</a></code></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/CommandNode.html#new%28name%3AString%2Cflags%3AArray%28CliGen%3A%3ABaseFlag%29%2Ccommands%3AArray%28CliGen%3A%3ACommandNode%29%2Cpre_run_commands%3AArray%28_%29%2Cpost_run_commands%3AArray%28_%29%29-class-method" class="tooltip">
|
||||||
|
<span>new(name : String, flags : Array(CliGen::BaseFlag), commands : Array(CliGen::CommandNode), pre_run_commands : Array(_), post_run_commands : Array(_))</span>
|
||||||
|
new</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructor-detail" class="anchor" href="#constructor-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructor Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="new(name,flags,commands,pre_run_commands,post_run_commands)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>new</strong>(name, flags, commands, pre_run_commands, post_run_commands)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#new%28name%2Cflags%2Ccommands%2Cpre_run_commands%2Cpost_run_commands%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="class-method-detail" class="anchor" href="#class-method-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Class Method Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="process(args:Array(String)=ARGV)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>process</strong>(args : Array(String) = <span class="t">ARGV</span>)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#process%28args%3AArray%28String%29%3DARGV%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>Serves as a convinence method for the user to call to begin processing an
|
||||||
|
argument array provided by the user.</p>
|
||||||
|
<p>This defaults to ARGV for convinence if no arguments are passed through</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-detail" class="anchor" href="#instance-method-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="check!-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>check!</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#check%21-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,450 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::Arg - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
class
|
||||||
|
</span> CliGen::<wbr>Arg
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="superclass-hierarchy"><li class="superclass"><a href="../CliGen/Arg.html">CliGen::Arg</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="overview" class="anchor" href="#overview">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Overview
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p>This class serves as a "argument wrapper" to force a fail-fast approach to
|
||||||
|
arg-parsing.</p>
|
||||||
|
<p>It wraps around the argument + index of the argument to do state tracking
|
||||||
|
and ensure that each argument is only processed once (plus allows for
|
||||||
|
easier filtering of processed arguments to avoid having to do index math)</p>
|
||||||
|
<pre><code class="language-crystal">args.reject(<span class="o">&</span>.processed?) <span class="c"># returns the args that haven't been processed yet</span></code></pre>
|
||||||
|
<p>It expects each argument to only be processed once and will force a raise
|
||||||
|
if the argument has Arg#processed called a second time. This is to force
|
||||||
|
the developer (me) to fix any processing issues during the development of
|
||||||
|
this framework.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/arg.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructors" class="anchor" href="#constructors">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructors
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#new%28value%3AString%2Cindex%3AInt32%29-class-method" class="signature"><strong>.new</strong>(value : String, index : Int32)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-summary" class="anchor" href="#instance-method-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#index%3AInt32-instance-method" class="signature"><strong>#index</strong> : Int32</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>The index of the argument in the array it was in</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#processed-instance-method" class="signature"><strong>#processed</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>This serves as a trigger that tells the object that it has been processed</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#processed%3F%3ABool-instance-method" class="signature"><strong>#processed?</strong> : Bool</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>The "flag"/variable that tracks is the Arg has been processed yet</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#value%3AString-instance-method" class="signature"><strong>#value</strong> : String</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>The raw string argument provided from the user</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructor-detail" class="anchor" href="#constructor-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructor Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="new(value:String,index:Int32)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>new</strong>(value : String, index : Int32)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#new%28value%3AString%2Cindex%3AInt32%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-detail" class="anchor" href="#instance-method-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="index:Int32-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>index</strong> : Int32
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#index%3AInt32-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>The index of the argument in the array it was in</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="processed-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>processed</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#processed-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>This serves as a trigger that tells the object that it has been processed</p>
|
||||||
|
<p>This will raise an exception if it is re-called after already having been
|
||||||
|
processed.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="processed?:Bool-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>processed?</strong> : Bool
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#processed%3F%3ABool-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>The "flag"/variable that tracks is the Arg has been processed yet</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="value:String-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>value</strong> : String
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#value%3AString-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>The raw string argument provided from the user</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::Argument - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
annotation
|
||||||
|
</span> CliGen::<wbr>Argument
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/annotations.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,528 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::BaseFlag - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
abstract class
|
||||||
|
</span> CliGen::<wbr>BaseFlag
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="superclass-hierarchy"><li class="superclass"><a href="../CliGen/BaseFlag.html">CliGen::BaseFlag</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="direct-known-subclasses" class="anchor" href="#direct-known-subclasses">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Direct Known Subclasses
|
||||||
|
</h2>
|
||||||
|
<ul class="other-types-list">
|
||||||
|
|
||||||
|
<li class="other-type"><a href="../CliGen/Flag.html">CliGen::Flag(T)</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/flag.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructors" class="anchor" href="#constructors">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructors
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#new%28var%3AString%2Cshort%3AString%7CNil%2Clong%3AString%7CNil%2Cenv_var%3AString%7CNil%2Cdescription%3AString%29-class-method" class="signature"><strong>.new</strong>(var : String, short : String | Nil, long : String | Nil, env_var : String | Nil, description : String)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-summary" class="anchor" href="#instance-method-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#description%3AString-instance-method" class="signature"><strong>#description</strong> : String</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#env_var%3AString%7CNil-instance-method" class="signature"><strong>#env_var</strong> : String | Nil</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#long%3AString%7CNil-instance-method" class="signature"><strong>#long</strong> : String | Nil</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#long_key%3AString-instance-method" class="signature"><strong>#long_key</strong> : String</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#matches%3F%28token%3AString%29%3ABool-instance-method" class="signature"><strong>#matches?</strong>(token : String) : Bool</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#raw_value%3AString%7CNil-instance-method" class="signature"><strong>#raw_value</strong> : String | Nil</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#satisfied%3F%3ABool-instance-method" class="signature"><strong>#satisfied?</strong> : Bool</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#short%3AString%7CNil-instance-method" class="signature"><strong>#short</strong> : String | Nil</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#validate%21%3ANil-instance-method" class="signature"><strong>#validate!</strong> : Nil</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#var%3AString-instance-method" class="signature"><strong>#var</strong> : String</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructor-detail" class="anchor" href="#constructor-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructor Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="new(var:String,short:String|Nil,long:String|Nil,env_var:String|Nil,description:String)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>new</strong>(var : String, short : String | Nil, long : String | Nil, env_var : String | Nil, description : String)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#new%28var%3AString%2Cshort%3AString%7CNil%2Clong%3AString%7CNil%2Cenv_var%3AString%7CNil%2Cdescription%3AString%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-detail" class="anchor" href="#instance-method-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="description:String-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>description</strong> : String
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#description%3AString-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="env_var:String|Nil-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>env_var</strong> : String | Nil
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#env_var%3AString%7CNil-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="long:String|Nil-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>long</strong> : String | Nil
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#long%3AString%7CNil-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="long_key:String-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>long_key</strong> : String
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#long_key%3AString-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="matches?(token:String):Bool-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>matches?</strong>(token : String) : Bool
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#matches%3F%28token%3AString%29%3ABool-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="raw_value:String|Nil-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
abstract
|
||||||
|
def <strong>raw_value</strong> : String | Nil
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#raw_value%3AString%7CNil-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="satisfied?:Bool-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
abstract
|
||||||
|
def <strong>satisfied?</strong> : Bool
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#satisfied%3F%3ABool-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="short:String|Nil-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>short</strong> : String | Nil
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#short%3AString%7CNil-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="validate!:Nil-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
abstract
|
||||||
|
def <strong>validate!</strong> : Nil
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#validate%21%3ANil-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="var:String-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>var</strong> : String
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#var%3AString-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,379 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::Command - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
class
|
||||||
|
</span> CliGen::<wbr>Command
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="superclass-hierarchy"><li class="superclass"><a href="../CliGen/Command.html">CliGen::Command</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command/argument.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command/selection.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command/subcommand.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command/trigger.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="macro-summary" class="anchor" href="#macro-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Macro Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#argument%28variable%2Cshort%2Clong%2Cdescription%2Cvalidation%3Dnil%29-macro" class="signature"><strong>argument</strong>(variable, short, long, description, validation = <span class="n">nil</span>)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#selection%28variable%2Cshort%2Clong%2Cdescription%2Coptions%29-macro" class="signature"><strong>selection</strong>(variable, short, long, description, options)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#subcommand%28func%2Cdescription%2Cexamples%3Dnil%2C%26block%29-macro" class="signature"><strong>subcommand</strong>(func, description, examples = <span class="n">nil</span>, &block)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#trigger%28short%2Clong%2Cargument%3Dnil%2C%26on_match%29-macro" class="signature"><strong>trigger</strong>(short, long, argument = <span class="n">nil</span>, &on_match)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="macro-detail" class="anchor" href="#macro-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Macro Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="argument(variable,short,long,description,validation=nil)-macro">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
macro <strong>argument</strong>(variable, short, long, description, validation = <span class="n">nil</span>)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#argument%28variable%2Cshort%2Clong%2Cdescription%2Cvalidation%3Dnil%29-macro">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="selection(variable,short,long,description,options)-macro">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
macro <strong>selection</strong>(variable, short, long, description, options)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#selection%28variable%2Cshort%2Clong%2Cdescription%2Coptions%29-macro">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="subcommand(func,description,examples=nil,&block)-macro">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
macro <strong>subcommand</strong>(func, description, examples = <span class="n">nil</span>, &block)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#subcommand%28func%2Cdescription%2Cexamples%3Dnil%2C%26block%29-macro">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="trigger(short,long,argument=nil,&on_match)-macro">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
macro <strong>trigger</strong>(short, long, argument = <span class="n">nil</span>, &on_match)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#trigger%28short%2Clong%2Cargument%3Dnil%2C%26on_match%29-macro">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::CommandInfo - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
annotation
|
||||||
|
</span> CliGen::<wbr>CommandInfo
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/annotations.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,441 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::CommandNode - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
class
|
||||||
|
</span> CliGen::<wbr>CommandNode
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="superclass-hierarchy"><li class="superclass"><a href="../CliGen/CommandNode.html">CliGen::CommandNode</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="direct-known-subclasses" class="anchor" href="#direct-known-subclasses">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Direct Known Subclasses
|
||||||
|
</h2>
|
||||||
|
<ul class="other-types-list">
|
||||||
|
|
||||||
|
<li class="other-type"><a href="../CliGen/App.html">CliGen::App</a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/command_node.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructors" class="anchor" href="#constructors">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructors
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#new%28name%3AString%2Cflags%3AArray%28CliGen%3A%3ABaseFlag%29%2Ccommands%3AArray%28CliGen%3A%3ACommandNode%29%2Cpre_run_commands%3AArray%28_%29%2Cpost_run_commands%3AArray%28_%29%29-class-method" class="signature"><strong>.new</strong>(name : String, flags : Array(CliGen::BaseFlag), commands : Array(CliGen::CommandNode), pre_run_commands : Array(_), post_run_commands : Array(_))</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-summary" class="anchor" href="#instance-method-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#check%21-instance-method" class="signature"><strong>#check!</strong></a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#check_for_duplicates%21%28flags%3AArray%28BaseFlag%29%29-instance-method" class="signature"><strong>#check_for_duplicates!</strong>(flags : Array(BaseFlag))</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#find_match%28arg%3AString%29-instance-method" class="signature"><strong>#find_match</strong>(arg : String)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#process%28args%3AArray%28String%29%29-instance-method" class="signature"><strong>#process</strong>(args : Array(String))</a>
|
||||||
|
|
||||||
|
<div class="summary"><p>This serves to just convert the arguments into a usable Array(Arg) format and pass it to the ACTUAL CommandNode#process method</p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#process%28args%3AArray%28Arg%29%29%3ANil-instance-method" class="signature"><strong>#process</strong>(args : Array(Arg)) : Nil</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructor-detail" class="anchor" href="#constructor-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructor Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="new(name:String,flags:Array(CliGen::BaseFlag),commands:Array(CliGen::CommandNode),pre_run_commands:Array(_),post_run_commands:Array(_))-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>new</strong>(name : String, flags : Array(<a href="../CliGen/BaseFlag.html">CliGen::BaseFlag</a>), commands : Array(<a href="../CliGen/CommandNode.html">CliGen::CommandNode</a>), pre_run_commands : Array(_), post_run_commands : Array(_))
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#new%28name%3AString%2Cflags%3AArray%28CliGen%3A%3ABaseFlag%29%2Ccommands%3AArray%28CliGen%3A%3ACommandNode%29%2Cpre_run_commands%3AArray%28_%29%2Cpost_run_commands%3AArray%28_%29%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-detail" class="anchor" href="#instance-method-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="check!-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>check!</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#check%21-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="check_for_duplicates!(flags:Array(BaseFlag))-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>check_for_duplicates!</strong>(flags : Array(<a href="../CliGen/BaseFlag.html">BaseFlag</a>))
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#check_for_duplicates%21%28flags%3AArray%28BaseFlag%29%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="find_match(arg:String)-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>find_match</strong>(arg : String)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#find_match%28arg%3AString%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="process(args:Array(String))-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>process</strong>(args : Array(String))
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#process%28args%3AArray%28String%29%29-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>This serves to just convert the arguments into a usable Array(Arg) format
|
||||||
|
and pass it to the ACTUAL CommandNode#process method</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="process(args:Array(Arg)):Nil-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>process</strong>(args : Array(<a href="../CliGen/Arg.html">Arg</a>)) : Nil
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#process%28args%3AArray%28Arg%29%29%3ANil-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::DefaultFlag - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
annotation
|
||||||
|
</span> CliGen::<wbr>DefaultFlag
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,514 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::Flag(T) - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
class
|
||||||
|
</span> CliGen::<wbr>Flag(T)
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<ul class="superclass-hierarchy"><li class="superclass"><a href="../CliGen/Flag.html">CliGen::Flag(T)</a></li><li class="superclass"><a href="../CliGen/BaseFlag.html">CliGen::BaseFlag</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/flag.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructors" class="anchor" href="#constructors">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructors
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#new%28var%3AString%2Cshort%3AString%7CNil%2Clong%3AString%7CNil%2Cenv_var%3AString%7CNil%2Cdescription%3AString%2Cdefault%3AT%7CNil%3Dnil%2Coptions%3AArray%28String%29%7CNil%3Dnil%2Cvalidate%3AT-%3EBool%7CNil%3Dnil%2Con_match%3AProc%28Nil%29%7CNil%3Dnil%29-class-method" class="signature"><strong>.new</strong>(var : String, short : String | Nil, long : String | Nil, env_var : String | Nil, description : String, default : T | Nil = <span class="n">nil</span>, options : Array(String) | Nil = <span class="n">nil</span>, validate : T -> Bool | Nil = <span class="n">nil</span>, on_match : Proc(Nil) | Nil = <span class="n">nil</span>)</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-summary" class="anchor" href="#instance-method-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#process%28argv%3AArray%28Arg%29%3D%5B%5DofArray%28Arg%29%29%3ANil-instance-method" class="signature"><strong>#process</strong>(argv : Array(Arg) = <span class="o">[]</span> <span class="k">of</span> <span class="t">Array</span>(<span class="t">Arg</span>)) : Nil</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#raw_value%3AString%7CNil-instance-method" class="signature"><strong>#raw_value</strong> : String | Nil</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#requires_arg%3F%3ABool-instance-method" class="signature"><strong>#requires_arg?</strong> : Bool</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#satisfied%3F%3ABool-instance-method" class="signature"><strong>#satisfied?</strong> : Bool</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#validate%21%3ANil-instance-method" class="signature"><strong>#validate!</strong> : Nil</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#value%21%3AT-instance-method" class="signature"><strong>#value!</strong> : T</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Instance methods inherited from class <code><a href="../CliGen/BaseFlag.html">CliGen::BaseFlag</a></code></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#description%3AString-instance-method" class="tooltip">
|
||||||
|
<span>description : String</span>
|
||||||
|
description</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#env_var%3AString%7CNil-instance-method" class="tooltip">
|
||||||
|
<span>env_var : String | Nil</span>
|
||||||
|
env_var</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#long%3AString%7CNil-instance-method" class="tooltip">
|
||||||
|
<span>long : String | Nil</span>
|
||||||
|
long</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#long_key%3AString-instance-method" class="tooltip">
|
||||||
|
<span>long_key : String</span>
|
||||||
|
long_key</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#matches%3F%28token%3AString%29%3ABool-instance-method" class="tooltip">
|
||||||
|
<span>matches?(token : String) : Bool</span>
|
||||||
|
matches?</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#raw_value%3AString%7CNil-instance-method" class="tooltip">
|
||||||
|
<span>raw_value : String | Nil</span>
|
||||||
|
raw_value</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#satisfied%3F%3ABool-instance-method" class="tooltip">
|
||||||
|
<span>satisfied? : Bool</span>
|
||||||
|
satisfied?</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#short%3AString%7CNil-instance-method" class="tooltip">
|
||||||
|
<span>short : String | Nil</span>
|
||||||
|
short</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#validate%21%3ANil-instance-method" class="tooltip">
|
||||||
|
<span>validate! : Nil</span>
|
||||||
|
validate!</a>,
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#var%3AString-instance-method" class="tooltip">
|
||||||
|
<span>var : String</span>
|
||||||
|
var</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Constructor methods inherited from class <code><a href="../CliGen/BaseFlag.html">CliGen::BaseFlag</a></code></h3>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../CliGen/BaseFlag.html#new%28var%3AString%2Cshort%3AString%7CNil%2Clong%3AString%7CNil%2Cenv_var%3AString%7CNil%2Cdescription%3AString%29-class-method" class="tooltip">
|
||||||
|
<span>new(var : String, short : String | Nil, long : String | Nil, env_var : String | Nil, description : String)</span>
|
||||||
|
new</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constructor-detail" class="anchor" href="#constructor-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constructor Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="new(var:String,short:String|Nil,long:String|Nil,env_var:String|Nil,description:String,default:T|Nil=nil,options:Array(String)|Nil=nil,validate:T->Bool|Nil=nil,on_match:Proc(Nil)|Nil=nil)-class-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def self.<strong>new</strong>(var : String, short : String | Nil, long : String | Nil, env_var : String | Nil, description : String, default : T | Nil = <span class="n">nil</span>, options : Array(String) | Nil = <span class="n">nil</span>, validate : T -> Bool | Nil = <span class="n">nil</span>, on_match : Proc(Nil) | Nil = <span class="n">nil</span>)
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#new%28var%3AString%2Cshort%3AString%7CNil%2Clong%3AString%7CNil%2Cenv_var%3AString%7CNil%2Cdescription%3AString%2Cdefault%3AT%7CNil%3Dnil%2Coptions%3AArray%28String%29%7CNil%3Dnil%2Cvalidate%3AT-%3EBool%7CNil%3Dnil%2Con_match%3AProc%28Nil%29%7CNil%3Dnil%29-class-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-detail" class="anchor" href="#instance-method-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="process(argv:Array(Arg)=[]ofArray(Arg)):Nil-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>process</strong>(argv : Array(<a href="../CliGen/Arg.html">Arg</a>) = <span class="o">[]</span> <span class="k">of</span> <span class="t">Array</span>(<span class="t">Arg</span>)) : Nil
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#process%28argv%3AArray%28Arg%29%3D%5B%5DofArray%28Arg%29%29%3ANil-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="raw_value:String|Nil-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>raw_value</strong> : String | Nil
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#raw_value%3AString%7CNil-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="requires_arg?:Bool-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>requires_arg?</strong> : Bool
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#requires_arg%3F%3ABool-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="satisfied?:Bool-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>satisfied?</strong> : Bool
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#satisfied%3F%3ABool-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="validate!:Nil-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>validate!</strong> : Nil
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#validate%21%3ANil-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="value!:T-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>value!</strong> : T
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#value%21%3AT-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,257 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::Format - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
module
|
||||||
|
</span> CliGen::<wbr>Format
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/format.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constant-summary" class="anchor" href="#constant-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constant Summary
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
|
||||||
|
<dt class="entry-const" id="INPUT_DATE_FORMAT">
|
||||||
|
<strong>INPUT_DATE_FORMAT</strong> = <code><span class="s">"%Y-%m-%d"</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="INPUT_DATETIME_FORMAT">
|
||||||
|
<strong>INPUT_DATETIME_FORMAT</strong> = <code><span class="s">"%Y-%m-%d %H:%M:%S"</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,445 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::MatchType - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
enum
|
||||||
|
</span> CliGen::<wbr>MatchType
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/match_type.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="enum-members" class="anchor" href="#enum-members">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Enum Members
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
|
||||||
|
<dt class="entry-const" id="FlagWithArg">
|
||||||
|
<strong>FlagWithArg</strong> = <code><span class="n">0</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="FlagMultipleShort">
|
||||||
|
<strong>FlagMultipleShort</strong> = <code><span class="n">1</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="ShortWithInlineArg">
|
||||||
|
<strong>ShortWithInlineArg</strong> = <code><span class="n">2</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="NoMatch">
|
||||||
|
<strong>NoMatch</strong> = <code><span class="n">3</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-summary" class="anchor" href="#instance-method-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Summary
|
||||||
|
</h2>
|
||||||
|
<ul class="list-summary">
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#flag_multiple_short%3F-instance-method" class="signature"><strong>#flag_multiple_short?</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns <code>true</code> if this enum value equals <code><a href="../CliGen/MatchType.html#FlagMultipleShort">FlagMultipleShort</a></code></p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#flag_with_arg%3F-instance-method" class="signature"><strong>#flag_with_arg?</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns <code>true</code> if this enum value equals <code><a href="../CliGen/MatchType.html#FlagWithArg">FlagWithArg</a></code></p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#no_match%3F-instance-method" class="signature"><strong>#no_match?</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns <code>true</code> if this enum value equals <code><a href="../CliGen/MatchType.html#NoMatch">NoMatch</a></code></p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="entry-summary">
|
||||||
|
<a href="#short_with_inline_arg%3F-instance-method" class="signature"><strong>#short_with_inline_arg?</strong></a>
|
||||||
|
|
||||||
|
<div class="summary"><p>Returns <code>true</code> if this enum value equals <code><a href="../CliGen/MatchType.html#ShortWithInlineArg">ShortWithInlineArg</a></code></p></div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="instance-method-detail" class="anchor" href="#instance-method-detail">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Instance Method Detail
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="flag_multiple_short?-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>flag_multiple_short?</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#flag_multiple_short%3F-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>Returns <code>true</code> if this enum value equals <code><a href="../CliGen/MatchType.html#FlagMultipleShort">FlagMultipleShort</a></code></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="flag_with_arg?-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>flag_with_arg?</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#flag_with_arg%3F-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>Returns <code>true</code> if this enum value equals <code><a href="../CliGen/MatchType.html#FlagWithArg">FlagWithArg</a></code></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="no_match?-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>no_match?</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#no_match%3F-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>Returns <code>true</code> if this enum value equals <code><a href="../CliGen/MatchType.html#NoMatch">NoMatch</a></code></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="entry-detail" id="short_with_inline_arg?-instance-method">
|
||||||
|
<div class="signature">
|
||||||
|
|
||||||
|
def <strong>short_with_inline_arg?</strong>
|
||||||
|
|
||||||
|
<a class="method-permalink" href="#short_with_inline_arg%3F-instance-method">#</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="doc">
|
||||||
|
|
||||||
|
<p>Returns <code>true</code> if this enum value equals <code><a href="../CliGen/MatchType.html#ShortWithInlineArg">ShortWithInlineArg</a></code></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::ProxyCommand - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
annotation
|
||||||
|
</span> CliGen::<wbr>ProxyCommand
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/annotations.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,277 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::Regex - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
module
|
||||||
|
</span> CliGen::<wbr>Regex
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/regex.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="constant-summary" class="anchor" href="#constant-summary">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Constant Summary
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
|
||||||
|
<dt class="entry-const" id="FLAG_MULTIPLE_SHORT">
|
||||||
|
<strong>FLAG_MULTIPLE_SHORT</strong> = <code><span class="s">/^-[a-zA-Z]+$/</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="FLAG_REGEX">
|
||||||
|
<strong>FLAG_REGEX</strong> = <code><span class="s">/^(-[a-zA-Z]|--[a-zA-Z-_]+)$/</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="FLAG_WITH_ARG">
|
||||||
|
<strong>FLAG_WITH_ARG</strong> = <code><span class="s">/^(?<flag>(-[a-zA-Z]|--[a-zA-Z-_]+))="?(?<arg>\S+?)"?$/</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="INPUT_DATE_REGEX">
|
||||||
|
<strong>INPUT_DATE_REGEX</strong> = <code><span class="s">/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="INPUT_DATETIME_REGEX">
|
||||||
|
<strong>INPUT_DATETIME_REGEX</strong> = <code><span class="s">/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
<dt class="entry-const" id="SHORT_WITH_INLINE_ARG">
|
||||||
|
<strong>SHORT_WITH_INLINE_ARG</strong> = <code><span class="s">/^-[a-zA-Z][a-zA-Z0-9]+$/</span></code>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::Selection - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
annotation
|
||||||
|
</span> CliGen::<wbr>Selection
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/annotations.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::SubCommand - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
annotation
|
||||||
|
</span> CliGen::<wbr>SubCommand
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/annotations.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="../css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGen::Trigger - CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "../";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="../index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent open current" data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="../CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="../CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="../CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="../CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="../CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="../CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="../CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="../CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="../CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="../CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="../CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="../CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="../CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="../CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="../CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="../CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="../CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" current" data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="../CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1 class="type-name">
|
||||||
|
|
||||||
|
<span class="kind">
|
||||||
|
annotation
|
||||||
|
</span> CliGen::<wbr>Trigger
|
||||||
|
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2>
|
||||||
|
<a id="defined-in" class="anchor" href="#defined-in">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
Defined in:
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
cligen/annotations.cr
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="methods-inherited">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,988 @@
|
|||||||
|
:root {
|
||||||
|
color-scheme: light dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
background: #FFFFFF;
|
||||||
|
position: relative;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: "Avenir", "Tahoma", "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
||||||
|
color: #333;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #263F6C;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: #112750;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
margin: 35px 0 25px;
|
||||||
|
color: #444444;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.type-name {
|
||||||
|
color: #47266E;
|
||||||
|
margin: 20px 0 30px;
|
||||||
|
background-color: #F8F8F8;
|
||||||
|
padding: 10px 12px;
|
||||||
|
border: 1px solid #EBEBEB;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
border-bottom: 1px solid #E6E6E6;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar, .main-content {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
p, li {
|
||||||
|
max-width: 42em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited {
|
||||||
|
max-width: 60em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
width: 30em;
|
||||||
|
color: #F8F4FD;
|
||||||
|
background-color: #2E1052;
|
||||||
|
padding: 0 0 30px;
|
||||||
|
box-shadow: inset -3px 0 4px rgba(0,0,0,.35);
|
||||||
|
line-height: 1.2;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .search-box {
|
||||||
|
padding: 13px 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input {
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 5px;
|
||||||
|
font: inherit;
|
||||||
|
font-family: inherit;
|
||||||
|
line-height: 1.2;
|
||||||
|
width: 100%;
|
||||||
|
border: 0;
|
||||||
|
outline: 0;
|
||||||
|
border-radius: 2px;
|
||||||
|
box-shadow: 0px 3px 5px rgba(0,0,0,.25);
|
||||||
|
transition: box-shadow .12s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input:focus {
|
||||||
|
box-shadow: 0px 5px 6px rgba(0,0,0,.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input::-webkit-input-placeholder { /* Chrome/Opera/Safari */
|
||||||
|
color: #757575;
|
||||||
|
font-size: 14px;
|
||||||
|
text-indent: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input::-moz-placeholder { /* Firefox 19+ */
|
||||||
|
color: #757575;
|
||||||
|
font-size: 14px;
|
||||||
|
text-indent: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input:-ms-input-placeholder { /* IE 10+ */
|
||||||
|
color: #757575;
|
||||||
|
font-size: 14px;
|
||||||
|
text-indent: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input:-moz-placeholder { /* Firefox 18- */
|
||||||
|
color: #757575;
|
||||||
|
font-size: 14px;
|
||||||
|
text-indent: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-summary {
|
||||||
|
padding: 9px 15px 30px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-name {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
margin: 0;
|
||||||
|
color: #f4f4f4;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-version {
|
||||||
|
margin-top: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-version > form::after {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
content: "\25BC";
|
||||||
|
font-size: .6em;
|
||||||
|
line-height: 1.2rem;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-versions-nav {
|
||||||
|
cursor: pointer;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 .9em 0 0;
|
||||||
|
border: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
background-color: transparent;
|
||||||
|
color: inherit;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
.project-versions-nav:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-versions-nav > option {
|
||||||
|
color: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none outside;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar li {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.hide {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
transition: color .14s;
|
||||||
|
}
|
||||||
|
.types-list a {
|
||||||
|
display: block;
|
||||||
|
padding: 5px 15px 5px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar a:focus {
|
||||||
|
outline: 1px solid #D1B7F1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list a {
|
||||||
|
padding: 5px 15px 5px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .current > a,
|
||||||
|
.sidebar a:hover {
|
||||||
|
color: #866BA6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li ul {
|
||||||
|
overflow: hidden;
|
||||||
|
height: 0;
|
||||||
|
max-height: 0;
|
||||||
|
transition: 1s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.parent {
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.parent::before {
|
||||||
|
box-sizing: border-box;
|
||||||
|
content: "▼";
|
||||||
|
display: block;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
text-align: center;
|
||||||
|
color: white;
|
||||||
|
font-size: 8px;
|
||||||
|
line-height: 30px;
|
||||||
|
transform: rotateZ(-90deg);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: .2s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.types-list li.parent > a {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.parent.open::before {
|
||||||
|
transform: rotateZ(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.types-list li.open > ul {
|
||||||
|
height: auto;
|
||||||
|
max-height: 1000em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
padding: 0 30px 30px 30px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kind {
|
||||||
|
font-size: 60%;
|
||||||
|
color: #866BA6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy {
|
||||||
|
margin: -15px 0 30px 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none outside;
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 7px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass + .superclass::before {
|
||||||
|
content: "<";
|
||||||
|
margin-right: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.other-types-list li {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.other-types-list,
|
||||||
|
.list-summary {
|
||||||
|
margin: 0 0 30px 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none outside;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-const {
|
||||||
|
font-family: Menlo, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-const code {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-summary {
|
||||||
|
padding-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass a,
|
||||||
|
.other-type a,
|
||||||
|
.entry-summary .signature {
|
||||||
|
padding: 4px 8px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
display: inline-block;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
color: #47266E;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
font-family: Menlo, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||||
|
transition: background .15s, border-color .15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass a:hover,
|
||||||
|
.other-type a:hover,
|
||||||
|
.entry-summary .signature:hover {
|
||||||
|
background: #D5CAE3;
|
||||||
|
border-color: #624288;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-summary .summary {
|
||||||
|
padding-left: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-summary .summary p {
|
||||||
|
margin: 12px 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-summary a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail {
|
||||||
|
padding: 30px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail .signature {
|
||||||
|
position: relative;
|
||||||
|
padding: 5px 15px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
display: block;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
color: #47266E;
|
||||||
|
border: 1px solid #f0f0f0;
|
||||||
|
font-family: Menlo, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||||
|
transition: .2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail:target .signature {
|
||||||
|
background-color: #D5CAE3;
|
||||||
|
border: 1px solid #624288;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail .signature .method-permalink {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -35px;
|
||||||
|
padding: 5px 15px;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #624288;
|
||||||
|
opacity: .4;
|
||||||
|
transition: opacity .2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail .signature .method-permalink:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail:target .signature .method-permalink {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited {
|
||||||
|
padding-right: 10%;
|
||||||
|
line-height: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited h3 {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited a {
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #47266E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
color: #6C518B;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited .tooltip>span {
|
||||||
|
background: #D5CAE3;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: -4px -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited .tooltip * {
|
||||||
|
color: #47266E;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 10px 20px;
|
||||||
|
margin-top: 4px;
|
||||||
|
border-radius: 3px;
|
||||||
|
line-height: 1.45;
|
||||||
|
overflow: auto;
|
||||||
|
color: #333;
|
||||||
|
background: #fdfdfd;
|
||||||
|
font-size: 14px;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: Menlo, Monaco, Consolas, 'Courier New', Courier, monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
:not(pre) > code {
|
||||||
|
background-color: rgba(40,35,30,0.05);
|
||||||
|
padding: 0.2em 0.4em;
|
||||||
|
font-size: 85%;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag {
|
||||||
|
padding: 2px 4px 1px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-right: 3px;
|
||||||
|
font-size: 11px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.orange {
|
||||||
|
background-color: #EE8737;
|
||||||
|
color: #FCEBDD;
|
||||||
|
border-color: #EB7317;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.yellow {
|
||||||
|
background-color: #E4B91C;
|
||||||
|
color: #FCF8E8;
|
||||||
|
border-color: #B69115;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.green {
|
||||||
|
background-color: #469C14;
|
||||||
|
color: #E2F9D3;
|
||||||
|
border-color: #34700E;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.red {
|
||||||
|
background-color: #BF1919;
|
||||||
|
color: #F9ECEC;
|
||||||
|
border-color: #822C2C;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.purple {
|
||||||
|
background-color: #2E1052;
|
||||||
|
color: #ECE1F9;
|
||||||
|
border-color: #1F0B37;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.lime {
|
||||||
|
background-color: #a3ff00;
|
||||||
|
color: #222222;
|
||||||
|
border-color: #00ff1e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip>span {
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0;
|
||||||
|
display: none;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip:hover>span {
|
||||||
|
display: inline-block;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.c {
|
||||||
|
color: #969896;
|
||||||
|
}
|
||||||
|
|
||||||
|
.n {
|
||||||
|
color: #0086b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t {
|
||||||
|
color: #0086b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.s {
|
||||||
|
color: #183691;
|
||||||
|
}
|
||||||
|
|
||||||
|
.i {
|
||||||
|
color: #7f5030;
|
||||||
|
}
|
||||||
|
|
||||||
|
.k {
|
||||||
|
color: #a71d5d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o {
|
||||||
|
color: #a71d5d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m {
|
||||||
|
color: #795da3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.search-results {
|
||||||
|
font-size: 90%;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-results mark {
|
||||||
|
color: inherit;
|
||||||
|
background: transparent;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.search-result {
|
||||||
|
padding: 5px 8px 5px 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
border-left: 5px solid transparent;
|
||||||
|
transform: translateX(-3px);
|
||||||
|
transition: all .2s, background-color 0s, border .02s;
|
||||||
|
min-height: 3.2em;
|
||||||
|
}
|
||||||
|
.search-result.current {
|
||||||
|
border-left-color: #ddd;
|
||||||
|
background-color: rgba(200,200,200,0.4);
|
||||||
|
transform: translateX(0);
|
||||||
|
transition: all .2s, background-color .5s, border 0s;
|
||||||
|
}
|
||||||
|
.search-result.current:hover,
|
||||||
|
.search-result.current:focus {
|
||||||
|
border-left-color: #866BA6;
|
||||||
|
}
|
||||||
|
.search-result:not(.current):nth-child(2n) {
|
||||||
|
background-color: rgba(255,255,255,.06);
|
||||||
|
}
|
||||||
|
.search-result__title {
|
||||||
|
font-size: 105%;
|
||||||
|
word-break: break-all;
|
||||||
|
line-height: 1.1;
|
||||||
|
padding: 3px 0;
|
||||||
|
}
|
||||||
|
.search-result__title strong {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.search-results .search-result__title > a {
|
||||||
|
padding: 0;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.search-result__title > a > .args {
|
||||||
|
color: #dddddd;
|
||||||
|
font-weight: 300;
|
||||||
|
transition: inherit;
|
||||||
|
font-size: 88%;
|
||||||
|
line-height: 1.2;
|
||||||
|
letter-spacing: -.02em;
|
||||||
|
}
|
||||||
|
.search-result__title > a > .args * {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result a,
|
||||||
|
.search-result a:hover {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
.search-result:not(.current):hover .search-result__title > a,
|
||||||
|
.search-result:not(.current):focus .search-result__title > a,
|
||||||
|
.search-result__title > a:focus {
|
||||||
|
color: #866BA6;
|
||||||
|
}
|
||||||
|
.search-result:not(.current):hover .args,
|
||||||
|
.search-result:not(.current):focus .args {
|
||||||
|
color: #6a5a7d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-result__type {
|
||||||
|
color: #e8e8e8;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
.search-result__doc {
|
||||||
|
color: #bbbbbb;
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
.search-result__doc p {
|
||||||
|
margin: 0;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 1.2em;
|
||||||
|
max-height: 2.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.js-modal-visible .modal-background {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.main-content {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.modal-background {
|
||||||
|
position: absolute;
|
||||||
|
display: none;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background: rgba(120,120,120,.4);
|
||||||
|
z-index: 100;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.usage-modal {
|
||||||
|
max-width: 90%;
|
||||||
|
background: #fff;
|
||||||
|
border: 2px solid #ccc;
|
||||||
|
border-radius: 9px;
|
||||||
|
padding: 5px 15px 20px;
|
||||||
|
min-width: 50%;
|
||||||
|
color: #555;
|
||||||
|
position: relative;
|
||||||
|
transform: scale(.5);
|
||||||
|
transition: transform 200ms;
|
||||||
|
}
|
||||||
|
.js-modal-visible .usage-modal {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
.usage-modal > .close-button {
|
||||||
|
position: absolute;
|
||||||
|
right: 15px;
|
||||||
|
top: 8px;
|
||||||
|
color: #aaa;
|
||||||
|
font-size: 27px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.usage-modal > .close-button:hover {
|
||||||
|
text-shadow: 2px 2px 2px #ccc;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.modal-title {
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: normal;
|
||||||
|
color: #666;
|
||||||
|
border-bottom: 2px solid #ddd;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.usage-list {
|
||||||
|
padding: 0;
|
||||||
|
margin: 13px;
|
||||||
|
}
|
||||||
|
.usage-list > li {
|
||||||
|
padding: 5px 2px;
|
||||||
|
overflow: auto;
|
||||||
|
padding-left: 100px;
|
||||||
|
min-width: 12em;
|
||||||
|
}
|
||||||
|
.usage-modal kbd {
|
||||||
|
background: #eee;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-bottom-width: 2px;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 3px 8px;
|
||||||
|
font-family: monospace;
|
||||||
|
margin-right: 2px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.usage-key {
|
||||||
|
float: left;
|
||||||
|
clear: left;
|
||||||
|
margin-left: -100px;
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
.doc-inherited {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anchor {
|
||||||
|
float: left;
|
||||||
|
padding-right: 4px;
|
||||||
|
margin-left: -20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content .anchor .octicon-link {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content .anchor:focus {
|
||||||
|
outline: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content h1:hover .anchor,
|
||||||
|
.main-content h2:hover .anchor,
|
||||||
|
.main-content h3:hover .anchor,
|
||||||
|
.main-content h4:hover .anchor,
|
||||||
|
.main-content h5:hover .anchor,
|
||||||
|
.main-content h6:hover .anchor {
|
||||||
|
text-decoration: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content h1 .octicon-link,
|
||||||
|
.main-content h2 .octicon-link,
|
||||||
|
.main-content h3 .octicon-link,
|
||||||
|
.main-content h4 .octicon-link,
|
||||||
|
.main-content h5 .octicon-link,
|
||||||
|
.main-content h6 .octicon-link {
|
||||||
|
visibility: hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content h1:hover .anchor .octicon-link,
|
||||||
|
.main-content h2:hover .anchor .octicon-link,
|
||||||
|
.main-content h3:hover .anchor .octicon-link,
|
||||||
|
.main-content h4:hover .anchor .octicon-link,
|
||||||
|
.main-content h5:hover .anchor .octicon-link,
|
||||||
|
.main-content h6:hover .anchor .octicon-link {
|
||||||
|
visibility: visible
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
font-size: 14px;
|
||||||
|
display: block;
|
||||||
|
max-width: -moz-fit-content;
|
||||||
|
max-width: fit-content;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
background: #fdfdfd;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
border-collapse: collapse;
|
||||||
|
padding: 0px 5px 0px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table th {
|
||||||
|
padding: 10px;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
table td {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn {
|
||||||
|
height: 32px;
|
||||||
|
width: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn-label {
|
||||||
|
height: 2em;
|
||||||
|
width: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn, #sidebar-btn-label {
|
||||||
|
display: none;
|
||||||
|
margin: .7rem;
|
||||||
|
appearance: none;
|
||||||
|
color: black;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 635px) {
|
||||||
|
.sidebar, .main-content {
|
||||||
|
/* svg size + vertical margin - .search-box padding-top */
|
||||||
|
padding-top: calc(2em + 2 * 0.7rem - 13px);
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn, #sidebar-btn-label {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 50;
|
||||||
|
transition-duration: 200ms;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn:not(:checked) ~ #sidebar-btn-label > .close,
|
||||||
|
#sidebar-btn:checked ~ #sidebar-btn-label > .open,
|
||||||
|
#sidebar-btn:checked ~ .main-content {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn:checked {
|
||||||
|
left: calc(100% - 32px - (2 * 0.7rem));
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn:checked ~ #sidebar-btn-label {
|
||||||
|
color: white;
|
||||||
|
/* 100% - svg size - horizontal margin */
|
||||||
|
left: calc(100% - 2em - (2 * 0.7rem));
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn~.sidebar {
|
||||||
|
width: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn:checked~.sidebar {
|
||||||
|
visibility: visible;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar {
|
||||||
|
transition-duration: 200ms;
|
||||||
|
max-width: 100vw;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
html, body {
|
||||||
|
background: #1b1b1b;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #8cb4ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content a:visited {
|
||||||
|
color: #5f8de3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.type-name {
|
||||||
|
color: white;
|
||||||
|
background-color: #202020;
|
||||||
|
border: 1px solid #353535;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project-versions-nav > option {
|
||||||
|
background-color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass a,
|
||||||
|
.superclass-hierarchy .superclass a:visited,
|
||||||
|
.other-type a,
|
||||||
|
.other-type a:visited,
|
||||||
|
.entry-summary .signature,
|
||||||
|
.entry-summary a:visited {
|
||||||
|
background-color: #202020;
|
||||||
|
color: white;
|
||||||
|
border: 1px solid #353535;
|
||||||
|
}
|
||||||
|
|
||||||
|
.superclass-hierarchy .superclass a:hover,
|
||||||
|
.other-type a:hover,
|
||||||
|
.entry-summary .signature:hover {
|
||||||
|
background: #443d4d;
|
||||||
|
border-color: #b092d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kind {
|
||||||
|
color: #b092d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.n {
|
||||||
|
color: #00ade6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t {
|
||||||
|
color: #00ade6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.k {
|
||||||
|
color: #ff66ae;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o {
|
||||||
|
color: #ff66ae;
|
||||||
|
}
|
||||||
|
|
||||||
|
.s {
|
||||||
|
color: #7799ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.i {
|
||||||
|
color: #b38668;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m {
|
||||||
|
color: #b9a5d6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.c {
|
||||||
|
color: #a1a1a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited a, .methods-inherited a:visited {
|
||||||
|
color: #B290D9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited a:hover {
|
||||||
|
color: #D4B7F4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited .tooltip>span {
|
||||||
|
background: #443d4d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.methods-inherited .tooltip * {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail:target .signature {
|
||||||
|
background-color: #443d4d;
|
||||||
|
border: 1px solid #b092d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail .signature {
|
||||||
|
background-color: #202020;
|
||||||
|
color: white;
|
||||||
|
border: 1px solid #353535;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-detail .signature .method-permalink {
|
||||||
|
color: #b092d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
:not(pre)>code {
|
||||||
|
background-color: #202020;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag.purple {
|
||||||
|
background-color: #443d4d;
|
||||||
|
color: #ECE1F9;
|
||||||
|
border-color: #b092d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input::-webkit-input-placeholder { /* Chrome/Opera/Safari */
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input::-moz-placeholder { /* Firefox 19+ */
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input:-ms-input-placeholder { /* IE 10+ */
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar input:-moz-placeholder { /* Firefox 18- */
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
table {
|
||||||
|
color: white;
|
||||||
|
background: #202020;
|
||||||
|
border: 1px solid #353535;
|
||||||
|
}
|
||||||
|
|
||||||
|
table th {
|
||||||
|
border-bottom: 1px solid #353535;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sidebar-btn, #sidebar-btn-label {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
+199
@@ -0,0 +1,199 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="generator" content="Crystal Docs 1.20.3">
|
||||||
|
<meta name="crystal_docs.project_version" content="object_rework-dev">
|
||||||
|
<meta name="crystal_docs.project_name" content="CliGenerator">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="css/style.css" rel="stylesheet" type="text/css" />
|
||||||
|
<script type="text/javascript" src="js/doc.js"></script>
|
||||||
|
|
||||||
|
<meta name="repository-name" content="CliGenerator">
|
||||||
|
<title>CliGenerator object_rework-dev</title>
|
||||||
|
<script type="text/javascript">
|
||||||
|
CrystalDocs.base_path = "";
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<svg class="hidden">
|
||||||
|
<symbol id="octicon-link" viewBox="0 0 16 16">
|
||||||
|
<path fill="currentColor" fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
<input type="checkbox" id="sidebar-btn">
|
||||||
|
<label for="sidebar-btn" id="sidebar-btn-label">
|
||||||
|
<svg class="open" xmlns="http://www.w3.org/2000/svg" height="2em" width="2em" viewBox="0 0 512 512"><title>Open Sidebar</title><path fill="currentColor" d="M80 96v64h352V96H80zm0 112v64h352v-64H80zm0 112v64h352v-64H80z"></path></svg>
|
||||||
|
<svg class="close" xmlns="http://www.w3.org/2000/svg" width="2em" height="2em" viewBox="0 0 512 512"><title>Close Sidebar</title><path fill="currentColor" d="m118.6 73.4-45.2 45.2L210.7 256 73.4 393.4l45.2 45.2L256 301.3l137.4 137.3 45.2-45.2L301.3 256l137.3-137.4-45.2-45.2L256 210.7Z"></path></svg>
|
||||||
|
</label>
|
||||||
|
<div class="sidebar">
|
||||||
|
<div class="sidebar-header">
|
||||||
|
<div class="search-box">
|
||||||
|
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="project-summary">
|
||||||
|
<h1 class="project-name">
|
||||||
|
<a href="index.html">
|
||||||
|
CliGenerator
|
||||||
|
</a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<span class="project-version">
|
||||||
|
object_rework-dev
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="search-results hidden">
|
||||||
|
<ul class="search-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="types-list">
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class="parent " data-id="CliGenerator/CliGen" data-name="cligen">
|
||||||
|
<a href="CliGen.html">CliGen</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/AdditionalDefaultFlag" data-name="cligen::additionaldefaultflag">
|
||||||
|
<a href="CliGen/AdditionalDefaultFlag.html">AdditionalDefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/App" data-name="cligen::app">
|
||||||
|
<a href="CliGen/App.html">App</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Arg" data-name="cligen::arg">
|
||||||
|
<a href="CliGen/Arg.html">Arg</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Argument" data-name="cligen::argument">
|
||||||
|
<a href="CliGen/Argument.html">Argument</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/BaseFlag" data-name="cligen::baseflag">
|
||||||
|
<a href="CliGen/BaseFlag.html">BaseFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Command" data-name="cligen::command">
|
||||||
|
<a href="CliGen/Command.html">Command</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandInfo" data-name="cligen::commandinfo">
|
||||||
|
<a href="CliGen/CommandInfo.html">CommandInfo</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/CommandNode" data-name="cligen::commandnode">
|
||||||
|
<a href="CliGen/CommandNode.html">CommandNode</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/DefaultFlag" data-name="cligen::defaultflag">
|
||||||
|
<a href="CliGen/DefaultFlag.html">DefaultFlag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Flag" data-name="cligen::flag(t)">
|
||||||
|
<a href="CliGen/Flag.html">Flag</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Format" data-name="cligen::format">
|
||||||
|
<a href="CliGen/Format.html">Format</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/MatchType" data-name="cligen::matchtype">
|
||||||
|
<a href="CliGen/MatchType.html">MatchType</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/ProxyCommand" data-name="cligen::proxycommand">
|
||||||
|
<a href="CliGen/ProxyCommand.html">ProxyCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Regex" data-name="cligen::regex">
|
||||||
|
<a href="CliGen/Regex.html">Regex</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Selection" data-name="cligen::selection">
|
||||||
|
<a href="CliGen/Selection.html">Selection</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/SubCommand" data-name="cligen::subcommand">
|
||||||
|
<a href="CliGen/SubCommand.html">SubCommand</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class=" " data-id="CliGenerator/CliGen/Trigger" data-name="cligen::trigger">
|
||||||
|
<a href="CliGen/Trigger.html">Trigger</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<h1><a id="cli-generator" class="anchor" href="#cli-generator"> <svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>CliGenerator</h1>
|
||||||
|
<p>This is a crystal project to manage setting up OptionParser objects based around "Command" objects and arguments you define inside them.</p>
|
||||||
|
<h2><a id="installation" class="anchor" href="#installation">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>Installation</h2>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
<p>Add the dependency to your <code>shard.yml</code>:</p>
|
||||||
|
<pre><code class="language-yaml">dependencies:
|
||||||
|
cligen:
|
||||||
|
git: https://git.arcanium.tech/tristan/cligen</code></pre>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>Run <code>shards install</code></p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<h2><a id="usage" class="anchor" href="#usage">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>Usage</h2>
|
||||||
|
<pre><code class="language-crystal"><span class="k">require</span> <span class="s">"cligen"</span></code></pre>
|
||||||
|
<h2><a id="contributors" class="anchor" href="#contributors">
|
||||||
|
<svg class="octicon-link" aria-hidden="true">
|
||||||
|
<use href="#octicon-link"/>
|
||||||
|
</svg>
|
||||||
|
</a>Contributors</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://git.arcanium.tech/tristan">Tristan Ancelet</a> - creator and maintainer</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
File diff suppressed because one or more lines are too long
+1099
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,131 +0,0 @@
|
|||||||
require "spec"
|
|
||||||
require "../src/command"
|
|
||||||
|
|
||||||
@[CliGen::CommandInfo(description: "Test")]
|
|
||||||
class CommandSubclass < CliGen::Command
|
|
||||||
|
|
||||||
define_argument(testvar,
|
|
||||||
type: Int32,
|
|
||||||
long: "--testvar TESTVAR",
|
|
||||||
description: "Does things"
|
|
||||||
)
|
|
||||||
|
|
||||||
define_argument(testvar_the_return,
|
|
||||||
type: Int32,
|
|
||||||
def_getter: true,
|
|
||||||
long: "--testvar_the_return TESTVAR",
|
|
||||||
description: "Does things"
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
EXAMPLES = [
|
|
||||||
"Have test"
|
|
||||||
]
|
|
||||||
|
|
||||||
@[CliGen::SubCommand(description: "test", examples: ::EXAMPLES)]
|
|
||||||
def CommandSubclass.do_thing
|
|
||||||
puts "HI"
|
|
||||||
end
|
|
||||||
|
|
||||||
@[CliGen::CommandPreRun]
|
|
||||||
def CommandSubclass.check_things
|
|
||||||
puts "I was run"
|
|
||||||
end
|
|
||||||
|
|
||||||
## Need to make sure EVERYTHING is generated before testing
|
|
||||||
macro finished
|
|
||||||
describe CliGen::Command do
|
|
||||||
|
|
||||||
describe "subclassing" do
|
|
||||||
|
|
||||||
describe "Creates the arguments" do
|
|
||||||
it "has testvar" do
|
|
||||||
{{CommandSubclass.class.has_method?(:testvar)}}.should be_true
|
|
||||||
end
|
|
||||||
|
|
||||||
it "has testvar2 getter" do
|
|
||||||
{{CommandSubclass.class.has_method?(:get_testvar_the_return)}}.should be_true
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
it "has Header" do
|
|
||||||
CommandSubclass::HEADER.empty?.should be_false
|
|
||||||
end
|
|
||||||
|
|
||||||
it "has examples" do
|
|
||||||
CommandSubclass::HEADER.includes?("Examples").should be_true
|
|
||||||
end
|
|
||||||
|
|
||||||
{% pre_runs = CommandSubclass.class.methods.select(&.annotation(::CliGen::CommandPreRun)) %}
|
|
||||||
{% run = CommandSubclass.class.methods.find{|m| m.name.stringify == "run"}.stringify %}
|
|
||||||
{% if pre_runs.size > 0 %}
|
|
||||||
describe "when defining pre-run methods" do
|
|
||||||
{% for pre_run in pre_runs %}
|
|
||||||
it "generates {{pre_run.name}}" do
|
|
||||||
{{run}}.includes?({{pre_run.name.stringify}}).should be_true
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
{% subcommands = CommandSubclass.class.methods.select(&.annotation(::CliGen::SubCommand)) %}
|
|
||||||
{% unless subcommands.empty? %}
|
|
||||||
describe "should have subcommands" do
|
|
||||||
{% for subcommand in subcommands %}
|
|
||||||
it "has {{subcommand.name}}" do
|
|
||||||
{{CommandSubclass.class.has_method?(subcommand.name.symbolize)}}.should be_true
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
{% arguments = CommandSubclass.class.methods.select(&.annotation(::CliGen::CommandArgument)) %}
|
|
||||||
{% unless arguments.empty? %}
|
|
||||||
describe "should have arguments" do
|
|
||||||
{% for argument in arguments %}
|
|
||||||
it "has {{argument.name}}" do
|
|
||||||
{{CommandSubclass.class.has_method?(argument.name.symbolize)}}.should be_true
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
{% if [arguments, subcommands].any?{|i| i.size >= 0 } %}
|
|
||||||
describe "should have generated OptionParser parser.on" do
|
|
||||||
{{ make_parser = CommandSubclass.class.methods.find{|m| m.name.stringify == "make_parser"}.stringify}}
|
|
||||||
{% unless subcommands.empty? %}
|
|
||||||
describe "for subcommands" do
|
|
||||||
{% for command in subcommands %}
|
|
||||||
it "has {{command.name}}" do
|
|
||||||
{{make_parser}}.includes?("on(" + {{command.name.stringify.stringify}}).should be_true
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
{% unless arguments.empty? %}
|
|
||||||
describe "for arguments" do
|
|
||||||
{% for argument in arguments %}
|
|
||||||
{% anno = argument.annotation(::CliGen::CommandArgument) %}
|
|
||||||
it "has " + {{anno[:long].stringify}} do
|
|
||||||
{{make_parser}}.includes?({{anno[:long]}}).should be_true
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
describe "Should have generated macro class methods" do
|
|
||||||
it "has generated run" do
|
|
||||||
{{CommandSubclass.class.has_method?(:run)}}.should be_true
|
|
||||||
end
|
|
||||||
|
|
||||||
it "has generated make_parser" do
|
|
||||||
{{CommandSubclass.class.has_method?(:make_parser)}}.should be_true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
+8
-75
@@ -1,11 +1,17 @@
|
|||||||
require "option_parser"
|
require "./cligen/parsable"
|
||||||
require "./cligen/regex"
|
require "./cligen/annotations"
|
||||||
require "./cligen/format"
|
require "./cligen/format"
|
||||||
|
require "./cligen/regex"
|
||||||
|
require "./cligen/flag"
|
||||||
|
require "./cligen/command"
|
||||||
|
require "./cligen/command_node"
|
||||||
|
require "./cligen/app"
|
||||||
|
|
||||||
module CliGen
|
module CliGen
|
||||||
VERSION = "0.1.0"
|
VERSION = "0.1.0"
|
||||||
|
|
||||||
APPNAME = File.basename(PROGRAM_NAME)
|
APPNAME = File.basename(PROGRAM_NAME)
|
||||||
|
|
||||||
record AdditionalDefaultFlag,
|
record AdditionalDefaultFlag,
|
||||||
short : String,
|
short : String,
|
||||||
long : String,
|
long : String,
|
||||||
@@ -26,78 +32,5 @@ module CliGen
|
|||||||
|
|
||||||
annotation DefaultFlag
|
annotation DefaultFlag
|
||||||
end
|
end
|
||||||
|
|
||||||
macro define_section(section_name, parser)
|
|
||||||
{{parser}}.separator ""
|
|
||||||
{{parser}}.separator "{{section_name.id}}".colorize(:green)
|
|
||||||
{{parser}}.separator "-------------------------------------------------------------------------------".colorize(:blue)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
alias OnType = Tuple(String, String) | Tuple(String, String, String)
|
|
||||||
macro define_default_flags(parser)
|
|
||||||
CliGen.define_section("Misc Flags", {{parser}})
|
|
||||||
{{parser}}.on("-h", "--help", "Print out this help output"){ abort {{parser}} }
|
|
||||||
{{parser}}.invalid_option{|opt|
|
|
||||||
abort "#{CliGen::APPNAME} : invalid_option : Inavlid option provided #{opt}"
|
|
||||||
}
|
|
||||||
{{parser}}.invalid_option{|opt|
|
|
||||||
case opt
|
|
||||||
when /^-+[a-z-]+/
|
|
||||||
STDERR.puts "#{CliGen::APPNAME} : ERROR : {{@type.name}} : {{parser}} : invalid_option : Inavlid option provided #{opt}"
|
|
||||||
else
|
|
||||||
abort "#{CliGen::APPNAME} : ERROR : {{@type.name}} : {{parser}} : invalid_option : Inavlid option provided #{opt}"
|
|
||||||
end
|
|
||||||
}
|
|
||||||
{{parser}}.missing_option{|opt|
|
|
||||||
abort "ERROR : {{@type.name}} : {{parser}} : missing_option : Argument was not provided to #{opt}"
|
|
||||||
}
|
|
||||||
{{parser}}.unknown_args{|opt|
|
|
||||||
unless opt.empty?
|
|
||||||
case opt.first
|
|
||||||
when /^-+[a-z-]+$/
|
|
||||||
STDERR.puts "ERROR : {{@type.name}} : {{parser}} : unknown_args : #{opt} not a configured argument"
|
|
||||||
else
|
|
||||||
abort "ERROR : {{@type.name}} : {{parser}} : unknown_args : #{opt} not a configured argument"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
CliGen::ADDITIONAL_DEFAULT_FLAGS.each do |flag|
|
|
||||||
if [ flag.short, flag.long ].all?(&.!= "")
|
|
||||||
{{parser}}.on(flag.short, flag.long, flag.description){|var| flag.work.call(var) }
|
|
||||||
elsif flag.short != ""
|
|
||||||
{{parser}}.on(flag.short, flag.description){|var| flag.work.call(var) }
|
|
||||||
elsif flag.long != ""
|
|
||||||
{{parser}}.on(flag.long, flag.description){|var| flag.work.call(var) }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
macro define_root_parser
|
|
||||||
ROOT_COMMAND = OptionParser.new do |parser|
|
|
||||||
parser.banner = "#{CliGen::APPNAME} [command] [flags]"
|
|
||||||
|
|
||||||
{% commands = ::CliGen::Command.subclasses %}
|
|
||||||
{% raise "ERROR : No commands defined (no subclasses of ::CliGen::Command were found)" if commands.empty? %}
|
|
||||||
CliGen.define_section("Commands", parser)
|
|
||||||
{% for command in commands %}
|
|
||||||
{{command.name}}.make_parser(parser)
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
CliGen.define_default_flags(parser)
|
|
||||||
|
|
||||||
abort parser if ARGV.empty?
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
macro finished
|
|
||||||
define_root_parser
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.parse
|
|
||||||
ROOT_COMMAND.parse
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
require "./cligen/command"
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
module CliGen
|
||||||
|
annotation ProxyCommand
|
||||||
|
end
|
||||||
|
|
||||||
|
annotation CommandInfo
|
||||||
|
end
|
||||||
|
|
||||||
|
annotation Argument
|
||||||
|
end
|
||||||
|
|
||||||
|
annotation Trigger
|
||||||
|
end
|
||||||
|
|
||||||
|
annotation Selection
|
||||||
|
end
|
||||||
|
|
||||||
|
annotation SubCommand
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
require "./arg"
|
||||||
|
require "./command_node"
|
||||||
|
require "./flag"
|
||||||
|
require "./app/generate"
|
||||||
|
|
||||||
|
module CliGen
|
||||||
|
# Root entry point. Holds a flattened copy of all flags from every command
|
||||||
|
# for global-flag matching, then hands off to the matched child CommandNode.
|
||||||
|
class App < CliGen::BaseCommandNode
|
||||||
|
@@instance : self?
|
||||||
|
|
||||||
|
def initialize(@name, flags : Array(BaseFlag), commands : Array(BaseCommandNode), pre_run_commands : Array(RunCommand), post_run_commands : Array(RunCommand))
|
||||||
|
super(name: @name, flags: flags, commands: commands, pre_run_commands: pre_run_commands, post_run_commands: post_run_commands)
|
||||||
|
@@instance = self
|
||||||
|
end
|
||||||
|
|
||||||
|
def check! : Nil
|
||||||
|
CliGen::GLOBAL_FLAGS.each(&.check!)
|
||||||
|
# @flags is the amalgamation of all child flags — checked by the commands themselves
|
||||||
|
check_for_duplicates!([CliGen::GLOBAL_FLAGS, @flags].flatten)
|
||||||
|
@commands.each(&.check!)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Convenience entry point; defaults to ARGV
|
||||||
|
def self.process(args : Array(String) = ARGV.to_a) : Nil
|
||||||
|
generate if @@instance.nil?
|
||||||
|
@@instance.not_nil!.process(args)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
module CliGen
|
||||||
|
macro finished
|
||||||
|
class App
|
||||||
|
private def self.generate
|
||||||
|
app_flags = [] of BaseFlag
|
||||||
|
app_commands = [] of BaseCommandNode
|
||||||
|
|
||||||
|
{% for cmd in CliGen::Command.subclasses %}
|
||||||
|
{% cmd_info = cmd.annotation(CliGen::CommandInfo) %}
|
||||||
|
{% raise "ERROR : CliGen::App.generate : No CliGen::CommandInfo annotation made for #{cmd.name}" unless cmd_info %}
|
||||||
|
{% raise "ERROR : CliGen::App.generate : Description must be provided for #{cmd.name}" unless cmd_info[:description].is_a? StringLiteral %}
|
||||||
|
{% cmd_name = cmd.name.split("::").last.downcase %}
|
||||||
|
{% cmd_flags = cmd.instance_vars.select{|v| v.annotation(CliGen::Argument) || v.annotation(CliGen::Selection) } %}
|
||||||
|
|
||||||
|
cmd_flags = [] of BaseFlag
|
||||||
|
cmd_sub_commands = [] of BaseCommandNode
|
||||||
|
cmd_pre_run_cmds = [] of Proc(Nil)
|
||||||
|
cmd_post_run_cmds = [] of Proc(Nil)
|
||||||
|
|
||||||
|
{% for var in cmd_flags %}
|
||||||
|
{% anno = var.annotation(CliGen::Argument) || var.annotation(CliGen::Selection) %}
|
||||||
|
cmd_flags << Flag({{var.type}}).new(
|
||||||
|
var: {{ var.name.stringify }},
|
||||||
|
short: {% if anno[:short] %} {{anno[:short]}} {% else %} nil {% end %},
|
||||||
|
long: {{ anno[:long] }},
|
||||||
|
env_var: {% if anno[:env_var] %} {{anno[:env_var]}} {% else %} {{"#{cmd.name.upcase}_#{var.name.upcase}"}} {% end %},
|
||||||
|
description: {{ anno[:description] }},
|
||||||
|
default: {% if anno[:default] %} {{anno[:default]}} {% else %} nil {% end %},
|
||||||
|
validate: {% if anno[:validate] %} {{anno[:validate]}} {% else %} nil {% end %},
|
||||||
|
on_match: {% if anno[:on_match] %} {{anno[:on_match]}} {% else %} nil {% end %}
|
||||||
|
)
|
||||||
|
{% end %}
|
||||||
|
|
||||||
|
# Keep a copy of every flag on the root for global matching
|
||||||
|
app_flags += cmd_flags
|
||||||
|
|
||||||
|
app_commands << CommandNode({{cmd}}).new(
|
||||||
|
name: {{cmd_name}},
|
||||||
|
flags: cmd_flags,
|
||||||
|
commands: cmd_sub_commands,
|
||||||
|
pre_run_commands: cmd_pre_run_cmds,
|
||||||
|
post_run_commands: cmd_post_run_cmds,
|
||||||
|
description: {{cmd_info[:description]}}
|
||||||
|
)
|
||||||
|
{% end %}
|
||||||
|
|
||||||
|
new(
|
||||||
|
name: ::PROGRAM_NAME,
|
||||||
|
flags: app_flags,
|
||||||
|
commands: app_commands,
|
||||||
|
pre_run_commands: [] of Proc(Nil),
|
||||||
|
post_run_commands: [] of Proc(Nil)
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
module CliGen
|
||||||
|
# This class serves as a "argument wrapper" to force a fail-fast approach to
|
||||||
|
# arg-parsing.
|
||||||
|
#
|
||||||
|
# It wraps around the argument + index of the argument to do state tracking
|
||||||
|
# and ensure that each argument is only processed once (plus allows for
|
||||||
|
# easier filtering of processed arguments to avoid having to do index math)
|
||||||
|
#
|
||||||
|
# args.reject(&.processed?) # returns the args that haven't been processed yet
|
||||||
|
#
|
||||||
|
# It expects each argument to only be processed once and will force a raise
|
||||||
|
# if the argument has Arg#processed called a second time. This is to force
|
||||||
|
# the developer (me) to fix any processing issues during the development of
|
||||||
|
# this framework.
|
||||||
|
class Arg
|
||||||
|
|
||||||
|
# The raw string argument provided from the user
|
||||||
|
getter value : String
|
||||||
|
# The index of the argument in the array it was in
|
||||||
|
getter index : Int32
|
||||||
|
# The "flag"/variable that tracks is the Arg has been processed yet
|
||||||
|
getter? processed : Bool = false
|
||||||
|
|
||||||
|
def initialize(@value, @index)
|
||||||
|
end
|
||||||
|
|
||||||
|
# This serves as a trigger that tells the object that it has been processed
|
||||||
|
#
|
||||||
|
# This will raise an exception if it is re-called after already having been
|
||||||
|
# processed.
|
||||||
|
def processed
|
||||||
|
raise "ERROR : CliGen::Arg(index: #{@index}, value: #{@value})#processed : This arg was re-processed" if @processed
|
||||||
|
@processed = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
module CliGen::Coercable
|
||||||
|
abstract def coerce(arg : String) : self
|
||||||
|
end
|
||||||
+19
-177
@@ -1,193 +1,35 @@
|
|||||||
require "colorize"
|
require "colorize"
|
||||||
require "time"
|
require "time"
|
||||||
|
|
||||||
require "./command/parser"
|
require "./annotations"
|
||||||
|
require "./command/argument"
|
||||||
|
require "./command/selection"
|
||||||
|
require "./command/trigger"
|
||||||
|
require "./command/subcommand"
|
||||||
|
|
||||||
module CliGen
|
module CliGen
|
||||||
|
|
||||||
annotation CommandPreRun
|
|
||||||
end
|
|
||||||
|
|
||||||
annotation CommandInfo
|
|
||||||
end
|
|
||||||
|
|
||||||
annotation CommandArgument
|
|
||||||
end
|
|
||||||
|
|
||||||
annotation CommandSelection
|
|
||||||
end
|
|
||||||
|
|
||||||
annotation SubCommand
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
class Command
|
class Command
|
||||||
extend CliGen::Parser
|
|
||||||
|
|
||||||
|
|
||||||
macro inherited
|
macro inherited
|
||||||
{% verbatim do %}
|
|
||||||
macro finished
|
macro finished
|
||||||
define_actions
|
def initialize(*, handler : CliGen::BaseCommandNode)
|
||||||
define_header
|
{% verbatim do %}
|
||||||
{% anno = @type.annotation(::CliGen::CommandInfo) %}
|
{% for var in @type.instance_vars %}
|
||||||
{% unless anno[:def_runner] == false %}
|
{% anno = (var.annotation(CliGen::Argument) || var.annotation(CliGen::Selection)) %}
|
||||||
define_runner
|
{% if anno %}
|
||||||
{% end %}
|
{% raise "ERROR : #{@type.name}#initialize : Argument '#{var.name}' cannot be a nilable type (#{var.type}) — flags always resolve to a concrete value" if var.type.union? %}
|
||||||
define_parser
|
if flg = handler.flags.find{|f| f.var == {{var.name.stringify}} && f.long == {{anno[:long]}}}
|
||||||
define_action_setter
|
@{{var.id}} = flg.as(CliGen::Flag({{var.type}})).value!
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
|
|
||||||
macro define_actions
|
|
||||||
@@action : String = ""
|
|
||||||
ACTIONS = {{@type.class.methods.select(&.annotation(::CliGen::SubCommand)).map(&.name.stringify)}} of String
|
|
||||||
end
|
|
||||||
|
|
||||||
macro define_header
|
|
||||||
{% name = @type.name.split("::").last.downcase.id %}
|
|
||||||
{% info_annos = @type.class.methods.select(&.annotation(::CliGen::SubCommand)).map(&.annotation(::CliGen::SubCommand)) %}
|
|
||||||
{% info_annos += @type.class.methods.select(&.annotation(::CliGen::CommandSelection)).map(&.annotation(::CliGen::CommandSelection)) %}
|
|
||||||
{% examples = [] of StringLiteral %}
|
|
||||||
{% info_annos.select(&.[](:examples)).map(&.[](:examples).resolve).each(&.each{|example| examples << example}) %}
|
|
||||||
HEADER = [
|
|
||||||
"#{CliGen::APPNAME} {{name}} [[flags]]",
|
|
||||||
"",
|
|
||||||
{% unless examples.empty? %}
|
|
||||||
"Examples:".colorize(:green),
|
|
||||||
"-------------------------------------------------------------------------------".colorize(:blue),
|
|
||||||
{% for example in examples %}
|
|
||||||
{{example}},
|
|
||||||
{% end %}
|
|
||||||
{% end %}
|
|
||||||
].join("\n")
|
|
||||||
end
|
|
||||||
|
|
||||||
macro define_selection(selection_name, short = "", long = "", description = nil, default = "", values = [] of StringLiteral)
|
|
||||||
{% if values.is_a? Path %}
|
|
||||||
{% values = values.resolve %}
|
|
||||||
{% end %}
|
|
||||||
{% raise "ERROR : define_selection : You MUST provide a description" unless description %}
|
|
||||||
{% raise "ERROR : define_selection : You must provide a valid set of values in Array(String) format" if values.empty? %}
|
|
||||||
{% description = "#{description.id} (valid: #{values.join(", ").id})" %}
|
|
||||||
{% unless default.empty? %}
|
|
||||||
{% description = "#{description.id} (default: #{default.id})" %}
|
|
||||||
{% end %}
|
|
||||||
@@{{selection_name}} : String = {{default}}
|
|
||||||
|
|
||||||
@[::CliGen::CommandArgument(short: {{short}}, long: {{long}}, description: {{description}} )]
|
|
||||||
def self.{{selection_name}}= (selection : String)
|
|
||||||
raise "ERROR : {{selection_name}} : Invalid Selection(#{selection}) (valid: {{values.map(&.id).join(", ").id}})" unless {{values}}.includes?(selection)
|
|
||||||
@@{{selection_name}} = selection
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
macro define_argument(arg_name, variable = nil, type = String, short = "", long = "", description = nil, subtype = Nil, format = nil, check = nil, def_getter = false, default = nil, logger = nil, &block?)
|
|
||||||
{% raise "ERROR : define_argument : You must provide a format or set it to \"auto\" to use builtin formats when defining a Time argument" if type.id.stringify == "Time" && format == nil %}
|
|
||||||
{% raise "ERROR : define_argument : You MUST provide a description" unless description %}
|
|
||||||
{% variable = arg_name unless variable %}
|
|
||||||
{% _type = type.id.stringify %}
|
|
||||||
{% _subtype = subtype.id.stringify %}
|
|
||||||
{% if _type == "String" %}
|
|
||||||
@@{{variable}} : {{type}} = ""
|
|
||||||
{% elsif _type == "Bool" %}
|
|
||||||
@@{{variable}} : {{type}} = false
|
|
||||||
{% elsif _type == "Int32" %}
|
|
||||||
@@{{variable}} : {{type}} = 0
|
|
||||||
{% elsif _type == "Array" %}
|
|
||||||
{% raise "define_argument : subtype can only be Int32 or String" unless %w[ Int32 String ].includes?(_subtype) %}
|
|
||||||
@@{{variable}} : {{type}}({{subtype}}) = [] of {{subtype}}
|
|
||||||
{% elsif _type == "Time" %}
|
|
||||||
@@{{variable}} : {{type}} = Time.unix(seconds: 0)
|
|
||||||
{% end %}
|
|
||||||
{% if def_getter %}
|
|
||||||
def self.get_{{arg_name}} : {{type}}
|
|
||||||
@@{{variable}}
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
@[::CliGen::CommandArgument(type: {{type}}, short: {{short}}, long: {{long}}, description: {{description}})]
|
|
||||||
def self.{{arg_name}}(var : String) : Nil
|
|
||||||
{% if check %}
|
|
||||||
## If the check exists go ahead and call it
|
|
||||||
{{check}}(var)
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
## If a logger method has been provided by the user
|
|
||||||
{% if logger %}
|
|
||||||
{{logger.id}} "Command : subclass : argument_setter : {{arg_name}} : Entered with #{var}"
|
|
||||||
{% end %}
|
|
||||||
{% if _type == "Time" %}
|
|
||||||
formats = [
|
|
||||||
CliGen::Regex::INPUT_DATETIME_REGEX,
|
|
||||||
CliGen::Regex::INPUT_DATE_REGEX
|
|
||||||
]
|
|
||||||
abort "ERROR : Command : {{arg_name}} : Incorrect format for provided data #{var}" unless formats.any?{|f| var.match(f)}
|
|
||||||
if var =~ formats[0]
|
|
||||||
@@{{variable}} = Time.parse_local(var, CliGen::Format::INPUT_DATETIME_FORMAT)
|
|
||||||
elsif var =~ formats[1]
|
|
||||||
@@{{variable}} = Time.parse_local(var, CliGen::Format::INPUT_DATE_FORMAT)
|
|
||||||
end
|
|
||||||
{% elsif _type == "Array" %}
|
|
||||||
{% if _subtype == "Int32" %}
|
|
||||||
var : Int32 = var.to_i
|
|
||||||
{% elsif _subtype == "String" %}
|
|
||||||
{% else %}
|
|
||||||
var = {{subtype}}.new(var)
|
|
||||||
{% end %}
|
|
||||||
@@{{variable}} << var
|
|
||||||
{% elsif _type == "Bool" %}
|
|
||||||
@@{{variable}} = true
|
|
||||||
{% elsif _type == "Int32" %}
|
|
||||||
@@{{variable}} = var.to_i
|
|
||||||
{% elsif _type == "String" %}
|
|
||||||
@@{{variable}} = var
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
macro define_runner
|
|
||||||
def self.run
|
|
||||||
{% pre_run_commands = @type.class.methods.select(&.annotation(::CliGen::CommandPreRun)) %}
|
|
||||||
{% unless pre_run_commands.empty? %}
|
|
||||||
## Ensuring that all runs that are tagged with the the CommandPreRun annotation are run
|
|
||||||
{% for method in pre_run_commands %}
|
|
||||||
{{method.name}}
|
|
||||||
{% end %}
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
{% selections = @type.class.methods.select(&.annotation(::CliGen::CommandSelection)) %}
|
|
||||||
{% methods = @type.class.methods.select(&.annotation(::CliGen::SubCommand)) %}
|
|
||||||
{% raise "ERROR : No commands or selections defined for #{@type.name}" if methods.empty? && selections.empty? %}
|
|
||||||
{% raise "ERROR : Can't define both selections and commands for work in #{@type.name}" if ! methods.empty? && ! selections.empty? %}
|
|
||||||
{% var = methods.empty? ? nil : "action" %}
|
|
||||||
{% targets = methods.empty? ? selections : methods %}
|
|
||||||
{% if targets == selections %}
|
|
||||||
{% selectors = selections.map(&.annotation(::CliGen::CommandSelection)).map(&.[:selector]).uniq %}
|
|
||||||
{% raise "ERROR : Can't provide more than a single selector for runner" if selectors.size > 1 %}
|
|
||||||
{% var = selectors.first %}
|
|
||||||
{% end %}
|
|
||||||
{% begin %}
|
|
||||||
case @@{{var.id}}
|
|
||||||
{% for target in targets %}
|
|
||||||
when {{target.name.stringify}}
|
|
||||||
{{target.name}}
|
|
||||||
{% end %}
|
|
||||||
else
|
else
|
||||||
abort "ERROR : No action provided to command {{@type.name}}"
|
raise "ERROR : {{@type.name}}#{{@def.name}} : No flag found for \"{{var.name}}\"?"
|
||||||
end
|
end
|
||||||
|
{% else %}
|
||||||
|
{% raise "ERROR : #{@type.name}#{@def.name} : Instance Variable(#{var.name}) is not handled by CliGen and does not have a default value" unless var.default %}
|
||||||
|
@{{var.id}} = {{var.default}}
|
||||||
|
{% end %}
|
||||||
|
{% end %}
|
||||||
{% end %}
|
{% end %}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
macro define_action_setter
|
|
||||||
def self.action=(action : String)
|
|
||||||
abort "ERROR : Action(#{action}) is not valid. Only #{ACTIONS.join(", ")} are acceptable" unless ACTIONS.includes?(action)
|
|
||||||
@@action = action
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
module CliGen
|
||||||
|
class Command
|
||||||
|
macro argument(variable, short, long, description, validation = nil)
|
||||||
|
{% raise "ERROR : CliGen::Command.argument : First argument (#{variable}) must be a TypeDeclaration (ex: '<var> : <type> [= val]')" unless variable.is_a? TypeDeclaration %}
|
||||||
|
{% name = variable.name %}
|
||||||
|
{% type = variable.type %}
|
||||||
|
{% raise "ERROR : CliGen::Command.argument(#{name}) : Provided short must be a string" unless short.is_a? StringLiteral || string == nil %}
|
||||||
|
{% raise "ERROR : CliGen::Command.argument(#{name}) : Provided long must be a string" unless long.is_a? StringLiteral || long == nil %}
|
||||||
|
{% raise "ERROR : CliGen::Command.argument(#{name}) : You must provide a short or long" unless long || short %}
|
||||||
|
{% raise "ERROR : CliGen::Command.argument(#{name}) : You must provide a description" unless description %}
|
||||||
|
{% raise "ERROR : CliGen::Command.argument(#{name}) : Provided description must be a String" unless description.is_a? StringLiteral %}
|
||||||
|
{% unless validation.nil? %}
|
||||||
|
{% raise "ERROR : CliGen::Command.argument(#{name}) : Provided validation must be a Proc" unless validation.is_a? ProcLiteral %}
|
||||||
|
{% raise "ERROR : CliGen::Command.argument(#{name}) : Provided validation return type must be a Bool" unless validation.return_type == Bool %}
|
||||||
|
{% raise "ERROR : CliGen::Command.argument(#{name}) : Provided validation provided validation must have an input variable" if validation.args.empty? %}
|
||||||
|
{% arg = validation.args.first %}
|
||||||
|
{% unless arg.restriction == type %}
|
||||||
|
{% example = "->(#{arg.name} : #{type}) : #{type} { #{validation.body} }" %}
|
||||||
|
{% raise "ERROR : CliGen::Command.argument(#{name}) : Provided validation input value must be #{type}. EX: #{example}" %}
|
||||||
|
{% end %}
|
||||||
|
{% end %}
|
||||||
|
|
||||||
|
@[CliGen::Argument(short: {{short}}, long: {{long}}, description: {{description}}, validation: {{validation}}, on_match: {{on_match}})]
|
||||||
|
@{{variable}}
|
||||||
|
|
||||||
|
def {{variable.name}}= (value : {{type}})
|
||||||
|
{% unless validation.nil? %}
|
||||||
|
raise "ERROR : #{@type.name}##{@def.name} : Provided value #{value} is not passing validation" unless {{validation}}.call(value)
|
||||||
|
{% end %}
|
||||||
|
@{{name}} = value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
module CliGen::Parser
|
|
||||||
|
|
||||||
macro extended
|
|
||||||
{% verbatim do %}
|
|
||||||
macro define_parser
|
|
||||||
def self.make_parser(parent_parser : OptionParser) : Nil
|
|
||||||
{% puts "#{@type.name} OptionParser is being generated" %}
|
|
||||||
{% name = @type.name.split("::").last %}
|
|
||||||
{% var = name.downcase %}
|
|
||||||
{% methods = @type.class.methods %}
|
|
||||||
{% info = @type.annotation(::CliGen::CommandInfo) %}
|
|
||||||
{% raise "ERROR : No CommandInfo annotation provided to {{@type.name}}" unless info %}
|
|
||||||
subparser = OptionParser.new do |parser|
|
|
||||||
parser.banner = {{@type.name}}::HEADER
|
|
||||||
|
|
||||||
{% selections = methods.select(&.annotation(::CliGen::CommandSelection)) %}
|
|
||||||
{% if selections.size > 0 %}
|
|
||||||
CliGen.define_section("Selections", parser)
|
|
||||||
{% for selection in selections %}
|
|
||||||
{% selection_anno = selection.annotation(::CliGen::CommandSelection) %}
|
|
||||||
parser.on({{selection.name.stringify}}, {{selection_anno[:description]}}){
|
|
||||||
{{@type.name}}.{{selection_anno[:selector]}}= {{selection.name.stringify}}
|
|
||||||
}
|
|
||||||
{% end %}
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
{% subcommands = methods.select(&.annotation(::CliGen::SubCommand)) %}
|
|
||||||
{% if subcommands.size > 0 %}
|
|
||||||
CliGen.define_section("Subcommands", parser)
|
|
||||||
{% for subcommand in subcommands %}
|
|
||||||
{% subcommand_anno = subcommand.annotation(::CliGen::SubCommand) %}
|
|
||||||
parser.on({{subcommand.name.stringify}}, {{subcommand_anno[:description]}}){
|
|
||||||
{{@type.name}}.action= {{subcommand.name.stringify}}
|
|
||||||
}
|
|
||||||
{% end %}
|
|
||||||
{% end %}
|
|
||||||
|
|
||||||
{% arguments = methods.select(&.annotation(::CliGen::CommandArgument)) %}
|
|
||||||
{% if arguments.size > 0 %}
|
|
||||||
CliGen.define_section("Provide Arguments", parser)
|
|
||||||
{% for argument in arguments %}
|
|
||||||
{% argument_anno = argument.annotation(::CliGen::CommandArgument) %}
|
|
||||||
{% if argument_anno[:short] == "" && argument_anno[:long] != "" %}
|
|
||||||
parser.on({{argument_anno[:long]}}, {{argument_anno[:description]}}){|val|
|
|
||||||
{% elsif argument_anno[:short] != "" && argument_anno[:long] == "" %}
|
|
||||||
parser.on({{argument_anno[:short]}}, {{argument_anno[:description]}}){|val|
|
|
||||||
{% else %}
|
|
||||||
parser.on({{argument_anno[:short]}}, {{argument_anno[:long]}}, {{argument_anno[:description]}}){|val|
|
|
||||||
{% end %}
|
|
||||||
{{@type.name}}.{{argument.name}}(val)
|
|
||||||
}
|
|
||||||
{% end %}
|
|
||||||
{% end %}
|
|
||||||
CliGen.define_default_flags(parser)
|
|
||||||
end
|
|
||||||
parent_parser.on({{var}}, {{info[:description]}}){
|
|
||||||
raise "ERROR : {{var.id}} not found in ARGV" unless i = ARGV.index({{var}})
|
|
||||||
## Removing all preceeding arguments so that only the actual required
|
|
||||||
## args for the next command are present
|
|
||||||
ARGV.shift(i+1)
|
|
||||||
abort subparser if ARGV.empty?
|
|
||||||
subparser.parse
|
|
||||||
{{@type.name}}.run
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
{% end %}
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
module CliGen
|
||||||
|
class Command
|
||||||
|
macro selection(variable, short, long, description, options)
|
||||||
|
{% raise "ERROR : CliGen::Command.selection : First selection must be a TypeDeclaration (ex: '<var> : <type> [= val]')" unless variable.is_a? TypeDeclaration %}
|
||||||
|
{% raise "ERROR : CliGen::Command.selection : Provided short must be a string" unless short.is_a? StringLiteral || string == nil %}
|
||||||
|
{% raise "ERROR : CliGen::Command.selection : Provided long must be a string" unless long.is_a? StringLiteral || long == nil %}
|
||||||
|
{% raise "ERROR : CliGen::Command.selection : You must provide a short or long" unless long || short %}
|
||||||
|
{% raise "ERROR : CliGen::Command.selection : You must provide a description" unless description %}
|
||||||
|
{% raise "ERROR : CliGen::Command.selection : Provided description must be a String" unless description.is_a? StringLiteral %}
|
||||||
|
{% raise "ERROR : CliGen::Command.selection : You must provide options" unless options %}
|
||||||
|
{% raise "ERROR : CliGen::Command.selection : Provided options must be " unless options %}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
module CliGen
|
||||||
|
class Command
|
||||||
|
macro subcommand(func, description, examples = nil, &block)
|
||||||
|
{% raise "ERROR : CliGen::Command.subcommand : First argument must be a TypeDeclaration (ex: '<var> : <type>')" unless variable.is_a? TypeDeclaration %}
|
||||||
|
{% raise "ERROR : CliGen::Command.subcommand : You must provide a description" unless description %}
|
||||||
|
{% raise "ERROR : CliGen::Command.subcommand : Provided description must be a String" unless description.is_a? StringLiteral %}
|
||||||
|
{% unless examples.nil? %}
|
||||||
|
{% examples = examples.resolve if examples.is_a? Path %}
|
||||||
|
{% raise "ERROR : CliGen::Command.subcommand : Provided example must be an Array" unless examples.is_a? ArrayLiteral %}
|
||||||
|
{% end %}
|
||||||
|
{% raise "ERROR : CliGen::Command.subcommand : You MUST provide a function body" unless block %}
|
||||||
|
|
||||||
|
@[CliGen::SubCommand(description: {{description}}, examples: {{examples}})]
|
||||||
|
def {{func}}
|
||||||
|
{{block.body}}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
module CliGen
|
||||||
|
class Command
|
||||||
|
macro trigger(short, long, argument = nil, &on_match)
|
||||||
|
{% raise "ERROR : CliGen::Command.trigger : Provided short must be a string" unless short.is_a? StringLiteral %}
|
||||||
|
{% raise "ERROR : CliGen::Command.trigger : Provided long must be a string" unless long.is_a? StringLiteral %}
|
||||||
|
{% raise "ERROR : CliGen::Command.trigger : Must provide a block for on_match trigger" unless on_match %}
|
||||||
|
{% name = long.gsub(/--/, "") %}
|
||||||
|
|
||||||
|
@[CliGen::Trigger(short: {{short}}, long: {{long}}, argument: {{argument}})]
|
||||||
|
{% if argument %}
|
||||||
|
def self.__cligen_trigger__{{name}}__({{name}} : {{argument}}) : Nil
|
||||||
|
{{on_match.body}}
|
||||||
|
end
|
||||||
|
{% else %}
|
||||||
|
def self.__cligen_trigger__{{name}}__ : Nil
|
||||||
|
{{on_match.body}}
|
||||||
|
end
|
||||||
|
{% end %}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,235 @@
|
|||||||
|
require "./global_flag"
|
||||||
|
require "./flag"
|
||||||
|
require "./arg"
|
||||||
|
require "ecr"
|
||||||
|
|
||||||
|
module CliGen
|
||||||
|
record SubCommandInfo,
|
||||||
|
name : String,
|
||||||
|
description : String,
|
||||||
|
examples : Array(String)?
|
||||||
|
|
||||||
|
alias RunCommand = Proc(Nil)
|
||||||
|
|
||||||
|
# Non-generic base that lets the tree hold heterogeneous CommandNode(T) children.
|
||||||
|
# Everything that doesn't depend on T lives here.
|
||||||
|
abstract class BaseCommandNode
|
||||||
|
getter name : String
|
||||||
|
getter flags : Array(BaseFlag)
|
||||||
|
getter commands : Array(BaseCommandNode)
|
||||||
|
getter description : String?
|
||||||
|
@pre_run_commands : Array(RunCommand)
|
||||||
|
@post_run_commands : Array(RunCommand)
|
||||||
|
|
||||||
|
def initialize(
|
||||||
|
@name : String,
|
||||||
|
flags : Array(BaseFlag),
|
||||||
|
@commands : Array(BaseCommandNode),
|
||||||
|
@pre_run_commands : Array(RunCommand),
|
||||||
|
@post_run_commands : Array(RunCommand),
|
||||||
|
@description : String? = nil
|
||||||
|
)
|
||||||
|
@flags = flags + CliGen::GLOBAL_FLAGS + @commands.flat_map(&.flags)
|
||||||
|
end
|
||||||
|
|
||||||
|
def help : String
|
||||||
|
ECR.render("src/cligen/template/cmd_help.ecr")
|
||||||
|
end
|
||||||
|
|
||||||
|
def check_for_duplicates!(flags : Array(BaseFlag)) : Nil
|
||||||
|
shorts = flags.compact_map(&.short)
|
||||||
|
short_duplicates = [] of String
|
||||||
|
longs = flags.compact_map { |f| f.long_key unless f.long_key.empty? }
|
||||||
|
long_duplicates = [] of String
|
||||||
|
|
||||||
|
last_short : String = ""
|
||||||
|
shorts.sort.each do |short|
|
||||||
|
short_duplicates << short if last_short == short
|
||||||
|
last_short = short
|
||||||
|
end
|
||||||
|
|
||||||
|
last_long : String = ""
|
||||||
|
longs.sort.each do |long|
|
||||||
|
long_duplicates << long if last_long == long
|
||||||
|
last_long = long
|
||||||
|
end
|
||||||
|
|
||||||
|
unless long_duplicates.empty? && short_duplicates.empty?
|
||||||
|
error_buffer = "ERROR : CommandNode(%s)#check! : Found Duplicates : %s"
|
||||||
|
|
||||||
|
message = ""
|
||||||
|
unless long_duplicates.empty?
|
||||||
|
message += "\nLong:\n%s\n" % long_duplicates.map { |f| "- #{f}" }.join("\n")
|
||||||
|
end
|
||||||
|
|
||||||
|
unless short_duplicates.empty?
|
||||||
|
message += "\nShort:\n%s" % short_duplicates.map { |f| "- #{f}" }.join("\n")
|
||||||
|
end
|
||||||
|
|
||||||
|
raise error_buffer % [@name, message]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get(flag_long : String) : BaseFlag?
|
||||||
|
@flags.find{|f| f.long_key == flag_long}
|
||||||
|
end
|
||||||
|
|
||||||
|
def find_match(arg : String)
|
||||||
|
if subcommand?(arg)
|
||||||
|
return CliGen::MatchType::SubCommand
|
||||||
|
end
|
||||||
|
case arg
|
||||||
|
when "-h", "--help"
|
||||||
|
CliGen::MatchType::Help
|
||||||
|
when CliGen::Regex::FLAG_REGEX
|
||||||
|
if flg = @flags.find(&.matches?(arg))
|
||||||
|
flg
|
||||||
|
else
|
||||||
|
CliGen::MatchType::NoMatch
|
||||||
|
end
|
||||||
|
when CliGen::Regex::FLAG_WITH_ARG
|
||||||
|
CliGen::MatchType::FlagWithArg
|
||||||
|
when CliGen::Regex::SHORT_WITH_INLINE_ARG
|
||||||
|
CliGen::MatchType::ShortWithInlineArg
|
||||||
|
when CliGen::Regex::FLAG_MULTIPLE_SHORT
|
||||||
|
CliGen::MatchType::FlagMultipleShort
|
||||||
|
else
|
||||||
|
if cmd = @commands.find { |c| c.name == arg }
|
||||||
|
cmd
|
||||||
|
else
|
||||||
|
CliGen::MatchType::NoMatch
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def subcommands? : Bool
|
||||||
|
subcommands.size > 0
|
||||||
|
end
|
||||||
|
|
||||||
|
def subcommand?(arg : String) : Bool
|
||||||
|
subcommands.any?{|f| f.name == arg}
|
||||||
|
end
|
||||||
|
|
||||||
|
# Converts String array to Arg array and hands off to the typed process method
|
||||||
|
def process(args : Array(String)) : Nil
|
||||||
|
new_args = args.each_with_index.map { |arg, i| Arg.new(value: arg, index: i) }.to_a
|
||||||
|
process(new_args)
|
||||||
|
end
|
||||||
|
|
||||||
|
abstract def subcommands : Array(SubCommandInfo)
|
||||||
|
abstract def check! : Nil
|
||||||
|
abstract def process(args : Array(Arg)) : Nil
|
||||||
|
end
|
||||||
|
|
||||||
|
class CommandNode(T) < BaseCommandNode
|
||||||
|
def subcommands : Array(SubCommandInfo)
|
||||||
|
{% subcmds = T.methods.select(&.annotation(CliGen::SubCommand)) %}
|
||||||
|
{% if subcmds.empty? %}
|
||||||
|
[] of SubCommandInfo
|
||||||
|
{% else %}
|
||||||
|
[
|
||||||
|
{% for cmd in subcmds %}
|
||||||
|
{% anno = cmd.annotation(CliGen::SubCommand) %}
|
||||||
|
SubCommandInfo.new(
|
||||||
|
name: {{cmd.name.stringify}},
|
||||||
|
description: {{anno[:description]}},
|
||||||
|
examples: {% if anno[:examples] %} {{anno[:examples]}} {% else %} nil {% end %}
|
||||||
|
),
|
||||||
|
{% end %}
|
||||||
|
]
|
||||||
|
{% end %}
|
||||||
|
end
|
||||||
|
|
||||||
|
def check! : Nil
|
||||||
|
@flags.each(&.check!)
|
||||||
|
check_for_duplicates!(@flags)
|
||||||
|
@commands.each(&.check!)
|
||||||
|
raise "ERROR : CommandNode({{T}})#check! : {{T}} has no subcommands and no #main defined" \
|
||||||
|
if subcommands.empty? && !{{T.has_method?(:main)}}
|
||||||
|
end
|
||||||
|
|
||||||
|
def process(args : Array(Arg)) : Nil
|
||||||
|
check!
|
||||||
|
passed_execution = false
|
||||||
|
matched_subcommand : String? = nil
|
||||||
|
|
||||||
|
@pre_run_commands.each(&.call)
|
||||||
|
|
||||||
|
args.each do |arg|
|
||||||
|
next if arg.processed?
|
||||||
|
arg.processed
|
||||||
|
|
||||||
|
case match = find_match(arg.value)
|
||||||
|
when BaseCommandNode
|
||||||
|
# Hand off remainder to the child; we're done at this level
|
||||||
|
match.process(args.reject(&.processed?))
|
||||||
|
passed_execution = true
|
||||||
|
|
||||||
|
when BaseFlag
|
||||||
|
if match.requires_arg?
|
||||||
|
match.process(args.reject(&.processed?))
|
||||||
|
else
|
||||||
|
match.process
|
||||||
|
end
|
||||||
|
|
||||||
|
when MatchType::SubCommand
|
||||||
|
raise "ERROR : CommandNode({{T}})#process : Subcommand(#{matched_subcommand}) was already matched" if matched_subcommand
|
||||||
|
matched_subcommand = arg.value
|
||||||
|
|
||||||
|
when MatchType::Help
|
||||||
|
abort help
|
||||||
|
|
||||||
|
when MatchType::FlagWithArg
|
||||||
|
if regex_match = CliGen::Regex::FLAG_WITH_ARG.match(arg.value)
|
||||||
|
case flag_match = find_match(regex_match["flag"])
|
||||||
|
when BaseFlag
|
||||||
|
flag_match.process([Arg.new(value: regex_match["arg"], index: arg.index)])
|
||||||
|
else
|
||||||
|
raise "ERROR : CommandNode(#{@name}).run : No flag matched '#{regex_match["flag"]}'"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
raise "Oh good, you broke regex. How the hell did it match in find_match but not above? What the hell is going on"
|
||||||
|
end
|
||||||
|
|
||||||
|
when MatchType::ShortWithInlineArg
|
||||||
|
abort "#{CliGen::APPNAME}: invalid flag '#{arg.value}' — inline values are not supported. Did you mean '#{arg.value[0..1]} #{arg.value[2..]}' ?"
|
||||||
|
|
||||||
|
when MatchType::FlagMultipleShort
|
||||||
|
arg.value.gsub(/^-/, "").chars.map { |c| "-#{c}" }.each do |flag|
|
||||||
|
case match = find_match(flag)
|
||||||
|
when BaseFlag
|
||||||
|
abort "#{CliGen::APPNAME}: cannot bundle flag that requires an argument: #{flag}" if match.requires_arg?
|
||||||
|
match.process
|
||||||
|
when MatchType::NoMatch
|
||||||
|
raise "ERROR : CommandNode(#{@name}).run : No match for '#{flag}'"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
when MatchType::NoMatch
|
||||||
|
raise "ERROR : CommandNode(#{@name}).run : No match for '#{arg.value}'"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@post_run_commands.each(&.call)
|
||||||
|
|
||||||
|
unless passed_execution
|
||||||
|
cls = T.new(self)
|
||||||
|
{% subcmds = T.methods.select(&.annotation(CliGen::SubCommand)) %}
|
||||||
|
{% begin %}
|
||||||
|
case matched_subcommand
|
||||||
|
{% for cmd in subcmds %}
|
||||||
|
when {{cmd.name.stringify}}
|
||||||
|
cls.{{cmd.name}}
|
||||||
|
{% end %}
|
||||||
|
else
|
||||||
|
{% if T.has_method?(:main) %}
|
||||||
|
cls.main
|
||||||
|
{% else %}
|
||||||
|
raise "ERROR : CommandNode({{T}})#{{@def.name}} : No subcommand matched and no #main defined"
|
||||||
|
{% end %}
|
||||||
|
end
|
||||||
|
{% end %}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
require "./arg"
|
||||||
|
|
||||||
|
module CliGen
|
||||||
|
abstract class BaseFlag
|
||||||
|
getter var : String
|
||||||
|
getter short : String?
|
||||||
|
getter long : String
|
||||||
|
getter long_key : String
|
||||||
|
getter env_var : String
|
||||||
|
getter description : String
|
||||||
|
|
||||||
|
def initialize(
|
||||||
|
@var : String,
|
||||||
|
@short : String?,
|
||||||
|
@long : String,
|
||||||
|
@env_var : String,
|
||||||
|
@description : String
|
||||||
|
)
|
||||||
|
# if the user provides just a "--long" I want the @long_key to match it
|
||||||
|
if @long.includes(" ")
|
||||||
|
@long_key = @long.split(" ").first
|
||||||
|
else
|
||||||
|
@long_key = @long
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def matches?(token : String) : Bool
|
||||||
|
token == @short || (!@long_key.empty? && token == @long_key)
|
||||||
|
end
|
||||||
|
|
||||||
|
abstract def satisfied? : Bool
|
||||||
|
abstract def validate! : Nil
|
||||||
|
abstract def raw_value : String?
|
||||||
|
abstract def check! : Nil
|
||||||
|
end
|
||||||
|
|
||||||
|
class Flag(T) < BaseFlag
|
||||||
|
@value : T?
|
||||||
|
@default : T?
|
||||||
|
@options : Array(T)?
|
||||||
|
@validate : (T -> Bool)?
|
||||||
|
@on_match : Proc(Nil)?
|
||||||
|
|
||||||
|
def initialize(
|
||||||
|
var : String,
|
||||||
|
short : String?,
|
||||||
|
long : String,
|
||||||
|
env_var : String,
|
||||||
|
description : String,
|
||||||
|
@default : T? = nil,
|
||||||
|
@options : Array(T)? = nil,
|
||||||
|
@validate : (T -> Bool)? = nil,
|
||||||
|
@on_match : Proc(Nil)? = nil
|
||||||
|
)
|
||||||
|
super(var, short, long, env_var, description)
|
||||||
|
end
|
||||||
|
|
||||||
|
def requires_arg? : Bool
|
||||||
|
{{T}} != Bool
|
||||||
|
end
|
||||||
|
|
||||||
|
def process(argv : Array(Arg) = [] of Arg) : Nil
|
||||||
|
if requires_arg?
|
||||||
|
raise "ERROR : Flag({{T}}) : Array requires an argument but provided array is empty" if argv.empty?
|
||||||
|
end
|
||||||
|
|
||||||
|
{% if T == Bool %}
|
||||||
|
@value = true
|
||||||
|
{% elsif T <= Array %}
|
||||||
|
{% raise "ERROR : Flag(#{T}) : You cannot define multiple types of array entries" if T.type_vars.size > 1 %}
|
||||||
|
{% elem = T.type_vars.first %}
|
||||||
|
argv.each do |arg|
|
||||||
|
break if arg.value.starts_with('-')
|
||||||
|
{% if elem == Int32 %}
|
||||||
|
(@value ||= [] of Int32) << arg.value.to_i
|
||||||
|
{% elsif elem == String %}
|
||||||
|
(@value ||= [] of String) << arg.value
|
||||||
|
{% elsif elem < CliGen::Coercable %}
|
||||||
|
if arg.value.includes?(",")
|
||||||
|
(@value ||= [] of {{elem}}) += arg.value.split(",").map{|i| {{elem}}.coerce(i)}
|
||||||
|
else
|
||||||
|
(@value ||= [] of {{elem}}) << {{elem}}.coerce(arg.value)
|
||||||
|
end
|
||||||
|
{% else %}
|
||||||
|
{% raise "ERROR : Flag(#{T}) : #{elem} is not a coercable type. If you wish to coerce it from a bare string include CliGen::Coercable & implement the class method" %}
|
||||||
|
{% end %}
|
||||||
|
arg.processed
|
||||||
|
end
|
||||||
|
{% elsif T == Int32 %}
|
||||||
|
@value = argv.first.value.to_i
|
||||||
|
argv.first.processed
|
||||||
|
{% elsif T == Time %}
|
||||||
|
@value = parse_time(argv.first.value)
|
||||||
|
argv.first.processed
|
||||||
|
{% elsif T == String %} # String
|
||||||
|
@value = argv.first.value
|
||||||
|
argv.first.processed
|
||||||
|
{% elsif T < CliGen::Parsable %}
|
||||||
|
processed = argv.select(&.processed?)
|
||||||
|
@value = T.parse_args(argv)
|
||||||
|
post_processed = argv.select(&.processed?)
|
||||||
|
if processed == post_processed
|
||||||
|
raise "ERROR : Flag({{T}}, long: #{@long_key})#process : Your {{T}}#process_args did not mark processed args as processed. Please check your code"
|
||||||
|
end
|
||||||
|
{% else %}
|
||||||
|
{% raise "ERROR : Flag({{T}}, long: #{@long_key})#process : Generic Type #{T} is not supported. To add support you must include CliGen::Parsable & implement the class method" %}
|
||||||
|
{% end %}
|
||||||
|
|
||||||
|
validate!
|
||||||
|
@on_match.try(&.call)
|
||||||
|
end
|
||||||
|
|
||||||
|
def value! : T
|
||||||
|
v = @value
|
||||||
|
|
||||||
|
# Priority: provided arg → env var → default → abort
|
||||||
|
if v.nil?
|
||||||
|
if raw = ENV[@env_var]?
|
||||||
|
v = coerce(raw)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
v ||= @default
|
||||||
|
|
||||||
|
raise "#{CliGen::APPNAME}: required flag #{@long_key} was not provided" if v.nil?
|
||||||
|
v.not_nil!
|
||||||
|
end
|
||||||
|
|
||||||
|
def raw_value : String?
|
||||||
|
{% if T == Bool %}
|
||||||
|
@value.try(&.to_s)
|
||||||
|
{% elsif T <= Array %}
|
||||||
|
@value.try(&.join(","))
|
||||||
|
{% else %}
|
||||||
|
@value.try(&.to_s)
|
||||||
|
{% end %}
|
||||||
|
end
|
||||||
|
|
||||||
|
def satisfied? : Bool
|
||||||
|
return true if !@value.nil?
|
||||||
|
return true if @env_var && ENV[@env_var]?
|
||||||
|
return true if !@default.nil?
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
|
def validate! : Nil
|
||||||
|
v = value!
|
||||||
|
|
||||||
|
if opts = @options
|
||||||
|
abort "#{CliGen::APPNAME}: '#{v}' is not a valid value for #{@long_key} (valid: #{opts.join(", ")})" unless opts.includes?(v)
|
||||||
|
end
|
||||||
|
|
||||||
|
if check = @validate
|
||||||
|
abort "#{CliGen::APPNAME}: validation failed for #{@long_key}" unless check.call(v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def check!
|
||||||
|
raise "ERROR : Flag({{T}}, long: #{@long})#check! : -h is reserved for internal help usage" if @short == "-h"
|
||||||
|
raise "ERROR : Flag({{T}}, long: #{@long})#check! : --help is reserved for internal help usage" if @long_key == "--help"
|
||||||
|
end
|
||||||
|
|
||||||
|
private def coerce(raw : String) : T
|
||||||
|
{% if T == Bool %}
|
||||||
|
raw == "true" || raw == "1"
|
||||||
|
{% elsif T == Int32 %}
|
||||||
|
raw.to_i
|
||||||
|
{% elsif T == Time %}
|
||||||
|
parse_time(raw)
|
||||||
|
{% elsif T <= Array %}
|
||||||
|
{% elem = T.type_vars.first %}
|
||||||
|
{% if elem == Int32 %}
|
||||||
|
raw.split(',').map(&.to_i)
|
||||||
|
{% elsif elem == String %}
|
||||||
|
raw.split(',')
|
||||||
|
{% elsif elem < CliGen::Coercable %}
|
||||||
|
raw.split(',').map{|i| {{elem}}.coerce(i)}
|
||||||
|
{% else %}
|
||||||
|
{% raise "ERROR : Flag(#{T}) : #{elem} is not a coercable type. If you wish to coerce it from a bare string include CliGen::Coercable & implement the class method" %}
|
||||||
|
{% end %}
|
||||||
|
{% elsif T == String %} # String
|
||||||
|
raw
|
||||||
|
{% elsif T < CliGen::Coercable %}
|
||||||
|
T.coerce(raw)
|
||||||
|
{% else %}
|
||||||
|
{% raise "ERROR : Flag(#{T}) : #{T} is not a coercable type. If you wish to coerce it from a bare string include CliGen::Coercable & implement the class method" %}
|
||||||
|
{% end %}
|
||||||
|
end
|
||||||
|
|
||||||
|
private def parse_time(raw : String) : Time
|
||||||
|
formats = [
|
||||||
|
CliGen::Regex::INPUT_DATETIME_REGEX,
|
||||||
|
CliGen::Regex::INPUT_DATE_REGEX
|
||||||
|
]
|
||||||
|
abort "#{CliGen::APPNAME}: invalid date/time format '#{raw}' (expected YYYY-MM-DD or YYYY-MM-DD HH:MM:SS)" unless formats.any? { |f| raw.match(f) }
|
||||||
|
if raw.match(formats[0])
|
||||||
|
Time.parse_local(raw, CliGen::Format::INPUT_DATETIME_FORMAT)
|
||||||
|
else
|
||||||
|
Time.parse_local(raw, CliGen::Format::INPUT_DATE_FORMAT)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
require "./flag"
|
||||||
|
|
||||||
|
module CliGen
|
||||||
|
GLOBAL_FLAGS = [] of BaseFlag
|
||||||
|
|
||||||
|
macro add_global_flag(type, long, description, env_var = nil, short = nil, validation = nil, &on_match)
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : type must be a TypeNode" unless type.is_a? TypeNode %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : long must begin a StringLiteral" unless long.is_a? StringLiteral %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : long must begin with --" unless long =~ /^--/ %}
|
||||||
|
{% if short %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : Short must be a StringLiteral" unless short.is_a? StringLiteral %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : Short must be a - with single char (ex: -a)" unless short =~ /^-[a-zA-Z]/ %}
|
||||||
|
{% end %}
|
||||||
|
{% if validation %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : validation must be a Proc" unless validation.is_a? ProcLiteral %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : validation proc return type must be nil \"->(...) : Nil {...}\"" unless validation.is_a? ProcLiteral %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : validation proc must have a single input variable" unless validation.args.size == 1%}
|
||||||
|
{% arg = validation.args.first %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : validation proc input variable MUST be typed to match the flag type \"->(#{arg.name} : #{type}) : Nil { ... }\"" unless arg.restriction == type %}
|
||||||
|
{% end %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : decription must be a StringLiteral" unless description.is_a? StringLiteral %}
|
||||||
|
{% if env_var %}
|
||||||
|
{% raise "ERROR : CliGen.add_global_flag : env_var must be a StringLiteral" unless env_var.is_a? StringLiteral %}
|
||||||
|
{% else %}
|
||||||
|
{% env_var = long.gsub(/--/, "").upcase %}
|
||||||
|
{% end %}
|
||||||
|
CliGen::GLOBAL_FLAGS << CliGen::Flag({{type}}).new(
|
||||||
|
var: "",
|
||||||
|
short: {{short}},
|
||||||
|
long: {{long}},
|
||||||
|
description: {{description}},
|
||||||
|
env_var: {{env_var}},
|
||||||
|
on_match: {% if on_match %} ->() : Nil { {{on_match.body}} } {% else %} nil {% end %},
|
||||||
|
validation: {% if validation %} {{validation}} {% else %} nil {% end %}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
module CliGen
|
||||||
|
enum MatchType
|
||||||
|
FlagWithArg
|
||||||
|
FlagMultipleShort
|
||||||
|
ShortWithInlineArg
|
||||||
|
SubCommand
|
||||||
|
Help
|
||||||
|
NoMatch
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
module CliGen::Parseable
|
||||||
|
abstract def parse_args(args : Array(CliGen::Arg)) : self
|
||||||
|
end
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
module CliGen::Regex
|
module CliGen::Regex
|
||||||
|
FLAG_REGEX=/^(-[a-zA-Z]|--[a-zA-Z-_]+)$/
|
||||||
|
FLAG_WITH_ARG=/^(?<flag>(-[a-zA-Z]|--[a-zA-Z-_]+))="?(?<arg>\S+?)"?$/
|
||||||
|
FLAG_MULTIPLE_SHORT=/^-[a-zA-Z]+$/
|
||||||
|
SHORT_WITH_INLINE_ARG=/^-[a-zA-Z][a-zA-Z0-9]+$/
|
||||||
|
|
||||||
INPUT_DATETIME_REGEX = /^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/
|
INPUT_DATETIME_REGEX = /^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$/
|
||||||
INPUT_DATE_REGEX = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/
|
INPUT_DATE_REGEX = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
Command: <% @name %>
|
||||||
|
<%- unless @description.nil? -%>
|
||||||
|
Description: <%= @description %>
|
||||||
|
<%- end -%>
|
||||||
|
|
||||||
|
Flags:
|
||||||
|
---------------------------------------------------------------
|
||||||
|
<%- @flags.each do |flag| -%>
|
||||||
|
<%- unless flag.short.nil? -%>
|
||||||
|
<%= "%-10s %s" % ["#{flag.short},#{flag.long}", flag.description] %>
|
||||||
|
<%- else -%>
|
||||||
|
<%= "%-10s %s" % [flag.long, flag.description] %>
|
||||||
|
<%- end -%>
|
||||||
|
|
||||||
|
<%- end -%>
|
||||||
|
<%- unless @commands.empty? -%>
|
||||||
|
Other Commands
|
||||||
|
---------------------------------------------------------------
|
||||||
|
<%- @commands.each do |command| -%>
|
||||||
|
<%= "%-10s %s" % [ command.name, command.description ] %>
|
||||||
|
<%- end -%>
|
||||||
|
|
||||||
|
<%- end -%>
|
||||||
|
<%- if subcommands? -%>
|
||||||
|
SubCommands of <%= @name %>:
|
||||||
|
---------------------------------------------------------------
|
||||||
|
<%- subcommands.each do |cmd| -%>
|
||||||
|
<%= "%-10 %s" % [cmd.name, cmd.description] %>
|
||||||
|
<%- end -%>
|
||||||
|
|
||||||
|
<%- cmds = subcommands.select{|c| ! c.examples.nil? } -%>
|
||||||
|
<%- unless cmds.empty? -%>
|
||||||
|
Examples:
|
||||||
|
---------------------------------------------------------------
|
||||||
|
<%- cmds.map(&.examples).flatten.each do |example| -%>
|
||||||
|
<%= example %>
|
||||||
|
<%- end -%>
|
||||||
|
|
||||||
|
<%- end -%>
|
||||||
|
<%- end -%>
|
||||||
|
|
||||||
|
Note: When wanting help output of any command you can provide the -h/--help flags or help command
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
!_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/
|
||||||
|
!_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/
|
||||||
|
!_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/
|
||||||
|
!_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/
|
||||||
|
!_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/
|
||||||
|
!_TAG_FIELD_DESCRIPTION file /File-restricted scoping/
|
||||||
|
!_TAG_FIELD_DESCRIPTION input /input file/
|
||||||
|
!_TAG_FIELD_DESCRIPTION name /tag name/
|
||||||
|
!_TAG_FIELD_DESCRIPTION pattern /pattern/
|
||||||
|
!_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/
|
||||||
|
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
||||||
|
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
||||||
|
!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/
|
||||||
|
!_TAG_OUTPUT_FILESEP slash /slash or backslash/
|
||||||
|
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/
|
||||||
|
!_TAG_OUTPUT_VERSION 1.1 /current.age/
|
||||||
|
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/
|
||||||
|
!_TAG_PROC_CWD /home/tristan/Projects/Crystal/cligen/ //
|
||||||
|
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
|
||||||
|
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
|
||||||
|
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
|
||||||
|
!_TAG_PROGRAM_VERSION 6.2.1 /v6.2.1/
|
||||||
Reference in New Issue
Block a user