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

## Constructors

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


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

#### Returns

* [_OptionParser](cli-_OptionParser.md) val^

---

## Public Functions

### parse
<span class="source-link">[[Source]](src/cli/command_parser.md#L306)</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.md) val
*   targ: ([String](builtin-String.md) val | [None](builtin-None.md) val)
*   args: [Array](builtin-Array.md)\[[String](builtin-String.md) val\] ref

#### Returns

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

---

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


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

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

#### Returns

* [Bool](builtin-Bool.md) val

---

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


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

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

#### Returns

* [Bool](builtin-Bool.md) val

---

