Skip to content
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

Rubocop: Fix all double negation #1292

Merged
merged 1 commit into from
Nov 23, 2016

Conversation

jaredmoody
Copy link
Contributor

How’s this look?

@PragTob
Copy link
Member

PragTob commented Nov 22, 2016

Hmm, form an introspection point of view I'd like the variable to be a boolean.

How about... @fixed_height = !height.nil? and then just remove the !! ? Does this work? Otherwise we could also do something like @variable_height = height.nil? and then adjust the methods

@jasonrclark
Copy link
Member

Does anything other than these predicate methods is @fixed_height? On phone so I can't search easily but I don't see use in the file, or att exposure.

If that's the case, how about just one nil? check in initialize and then the predicates are just pure returns?

@PragTob
Copy link
Member

PragTob commented Nov 23, 2016

@jasonrclark was the only usage I could find, I'm with you there one nil check in initialize :)

@jasonrclark
Copy link
Member

❤️

@jasonrclark jasonrclark merged commit 7244bc2 into shoes:master Nov 23, 2016
@jaredmoody jaredmoody deleted the rubocop-double-negation branch December 3, 2017 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants