This is a naive attempt at creating an RBI compiler for the
`Cask::Config` class. `Config` contains methods like `appdir` that
are defined dynamically using the class's default values and Sorbet
doesn't understand that these methods exist or what their return
types are. This compiler works as expected and gets the job done but
I know basically nothing about Tapioca, so there may be a better way
of doing this.
For what it's worth, this isn't an issue right now but Sorbet will
surface an error once `Cask::DSL` is updated to `typed: strict` (i.e.,
`Method appdir does not exist on Cask::Config`). That's something
I've been working on and this compiler is intended as a way of
preemptively resolving that Sorbet error, so I can move forward with
the `Cask::DSL` type signature work.
- The preferred way of doing RBI generation is via Tapioca. So I am
trying to stop being intimidated by it, by learning how it works.
- This is very WIP still, currently failing with the following message
because the `module` name is missing in the generated RBI file.
```
There are parse errors in the generated RBI files.
Errors:
sorbet/rbi/dsl/tty.rbi:8: unexpected token tNL (2001)
sorbet/rbi/dsl/tty.rbi:64: unexpected token "end" (2001)
```