Sha256: 441ee67331e1f9e0901484c6543a8553120293e3be561ca8d9d28d67b9a8966d

Contents?: true

Size: 1.86 KB

Versions: 1

Compression:

Stored size: 1.86 KB

Contents

# Sord

## Overview

Sord is a **So**rbet and YA**RD** crossover. It can automatically generate
Sorbet type signatures files by looking at the types specified in YARD 
documentation comments.

If your project is already YARD documented, then this can generate most of the
Sorbet signatures you need!

Sord has the following features:
  - Automatically generates signatures for modules, classes and methods
  - Support for multiple parameter or return types (`T.any`)
  - Gracefully handles missing YARD types (`T.untyped`)
  - Can infer setter parameter type from the corresponding getter's return type
  - Recognises mixins (`include` and `extend`)
  - Support for single-argument generic types such as `Array` (no hashes yet)

## Usage

Sord is a command line tool. To use it, open a terminal in the root directory
of your project, and run `yard` to generate a YARD registry if you haven't
already. Then, invoke `sord`, passing a path of where you'd like to save your
RBI to (this file will be overwritten):

```
sord defs.rbi
```

Sord will print information about what it's inferred as it runs. It is best to
fix any issues in the YARD documentation, as any edits made to the resulting
RBI file will be replaced if you re-run Sord.

## Example

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sord. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the Sord project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/sord/blob/master/CODE_OF_CONDUCT.md).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sord-0.1.0 README.md