-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
986a8af
commit e47b5d6
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
# yard → rbs-inline | ||
|
||
Rewrite YARD type annotations in Your codes to rbs-inline. | ||
Rewrite [YARD type annotations](https://yardoc.org/types.html) in Your codes to [rbs-inline](https://github.com/soutaro/rbs-inline). | ||
|
||
## Usage | ||
|
||
Install this gem with the following command. | ||
|
||
```console | ||
bundle | ||
gem install yard_to_rbs_inline | ||
``` | ||
|
||
Then, run the following command to insert rbs-inline comments to your code. | ||
|
||
```console | ||
# Print rewrited code to stdout. | ||
./exe/yard-rbs-inline --dry-run your-file.rb | ||
yard-rbs-inline --dry-run your-file.rb | ||
|
||
# Overwrite files. | ||
./exe/yard-rbs-inline your-file.rb | ||
yard-rbs-inline your-file.rb | ||
``` |