-
-
Notifications
You must be signed in to change notification settings - Fork 902
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
Enhancement: Add #key? #value? predicates to Node #1838
Comments
Hi! Thanks for opening this request. FYI - you can create a temporary local gemspec for testing by running I'd accept a PR for this functionality. If you're unsure how to go about doing it, I'm happy to collaborate with you on it. |
I can think of how |
And I think we already have key?. |
@knu - quite right, just Thanks @flavorjones think I figured it out, PR on the way. |
Will be in v1.11.0. |
Was gonna PR you this with (of course) tests, but couldn't figure out why my new methods were not found and the whole
tmp
folder builds thing. And then I read Y_U_NO_GEMSPEC.Rationale:
Rubocop bugs me that instead of iterating a
Nokogiri::XML::Node
using.keys.include?
or.values.include?
I should be using hash#key?
or#value?
methods. As Node is a hash-like object I figured why not add them.Code
The text was updated successfully, but these errors were encountered: