-
Notifications
You must be signed in to change notification settings - Fork 71
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
flag-like options in Slop#to_hash object (take2) #59
Conversation
I'm still not entirely sure about this. It's also a backward incompatible change which means according to semver (which Slop follows), this can't be merged until Slop v4. I'm going to leave it open for more discussion, though. Thanks for putting this work in |
I'm in for merging this. It seems strange that you can't get the true/false value from .to_hash, like in the older versions |
Have come here to post an issue about not being able to retrieve from I vote that the values of argumentless parameters in |
Thanks for chiming in guys. I'm +1 for this, but it is a backwards incompatible change. It'll have to wait for Slop 4.0 |
Great, thanks for listening :) But wasn't this the case in older versions? I know I used it, because it broke when i updated my gems ;) But still, great! |
@cmol Yup that was the case in older versions, and I think I was probably wrong trying to change it. This could perhaps go in as a bugfix instead. |
Closing this. It's now merged into master and will be available in 3.2.0 as a bugfix |
I reimplemented (#58) by tweaking Slop::Option#value.
Saving a flag value during processing options (Slop#process_item),
and return the value immediately if the @value exists and it is true, false or nil.
One more assertion tweaked as well.