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

Brendan's Rubocop solution #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brendanthomas1
Copy link

No description provided.

@brendanthomas1
Copy link
Author

For the method on line 22, #num_officers, is there a better way to name that?

Rubocop said that you shouldn't use set_ at the begging of writing methods, but I feel like my num_officers is ambiguous. Is there a Ruby convention for naming methods like these?

attr_reader :population

def initialize
@people = {
Copy link
Member

Choose a reason for hiding this comment

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

Splitting these out to @thieves and @officers will probably simplify things.

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.

2 participants