-
Notifications
You must be signed in to change notification settings - Fork 82
Added enum contract #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added enum contract #181
Conversation
lib/contracts/builtin_contracts.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you break the comment at 80 characters?
Can you add an example like this # Example: <tt>Enum[:a, :b, :c]</tt>?
|
Can you provide short description for this Pull Request? Can you add it to list of builtin contracts in |
|
Fixed. |
|
Can you prepare a new release? Are you going to follow semver? I saw that your version number has only two digits.... |
|
Yes I do want it. But I do not know if @egonSchiele is ok with that. Actually I have bumped to |
TUTORIAL.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in links title: RangeOf => Enum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in example: ; => ,
|
Nice contract! Just waiting on responses to @alex-fedorov 's comments before I merge. I agree we should switch to semver. |
|
Fixed. Sorry for the mistakes. |
|
@dg-ratiodata no problem :) LGTM, merging |
|
Thanks @dg-ratiodata! Do you need this to be released right away or this can wait? |
|
This one can wait. I've got a custom contract for that. The same is true for the PR I filed some minutes ago. |
I use contracts.ruby within a configuration class. Some options only allows a given subset of values - symbols. I added a custom contract for that, but thought it might be valueable for others as well.