Skip to content

Conversation

@sampriddy
Copy link

solution.rb Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of .tap

@mikegee
Copy link
Member

mikegee commented Dec 14, 2015

❤️ small, focused methods

solution.rb Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class instance variables are generally frowned upon. https://github.com/bbatsov/ruby-style-guide#no-class-vars

This should work fine as a constant instead. (Drop the "@@".)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, had no idea that a child's class variable OVERWRITES a class variable of the same name within its superclass. That's pretty surprising and now I see why class vars are not favored

@mikegee
Copy link
Member

mikegee commented Dec 15, 2015

❤️

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