# _OptionParser
<span class="source-link">[[Source]](src/cli/command_parser.md#L308)</span>
```pony
primitive val _OptionParser
```

## Constructors

### create
<span class="source-link">[[Source]](src/cli/command_parser.md#L308)</span>


```pony
new val create()
: _OptionParser val^
```

#### Returns

* [_OptionParser](cli-_OptionParser) val^

---

## Public Functions

### parse
<span class="source-link">[[Source]](src/cli/command_parser.md#L309)</span>


```pony
fun box parse(
  spec: OptionSpec val,
  targ: (String val | None val),
  args: Array[String val] ref)
: (Option val | SyntaxError val)
```
#### Parameters

*   spec: [OptionSpec](cli-OptionSpec) val
*   targ: ([String](builtin-String) val | [None](builtin-None) val)
*   args: [Array](builtin-Array)\[[String](builtin-String) val\] ref

#### Returns

* ([Option](cli-Option) val | [SyntaxError](cli-SyntaxError) val)

---

### eq
<span class="source-link">[[Source]](src/cli/command_parser.md#L309)</span>


```pony
fun box eq(
  that: _OptionParser val)
: Bool val
```
#### Parameters

*   that: [_OptionParser](cli-_OptionParser) val

#### Returns

* [Bool](builtin-Bool) val

---

### ne
<span class="source-link">[[Source]](src/cli/command_parser.md#L309)</span>


```pony
fun box ne(
  that: _OptionParser val)
: Bool val
```
#### Parameters

*   that: [_OptionParser](cli-_OptionParser) val

#### Returns

* [Bool](builtin-Bool) val

---

