File: README.md

package info (click to toggle)
ruby-contracts 0.17-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 624 kB
  • sloc: ruby: 3,805; makefile: 4; sh: 2
file content (22 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
To use builtin contracts you can refer them with `Contracts::*`:

```ruby
Contract Contracts::Num => Contracts::Maybe(Contracts::Num)
```

It is recommended to use a short alias for `Contracts`, for example `C`:

```ruby
C = Contracts

Contract C::Num => C::Maybe(C::Num)
```

It is possible to `include Contracts` and refer them without namespace, but
this is deprecated and not recommended.

*NOTE: in the future it will be possible to do `include Contracts::Builtin`
instead.*

*NOTE: all contracts marked as (TODO) have their documentaion `.feature` file
as stub. Contributions to those are warmly welcome!*