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

Capture logic 2 #24

Merged
merged 4 commits into from Feb 25, 2017
Merged

Capture logic 2 #24

merged 4 commits into from Feb 25, 2017

Conversation

sylyu
Copy link
Contributor

@sylyu sylyu commented Feb 23, 2017

second pull request from different branch

@sylyu
Copy link
Contributor Author

sylyu commented Feb 23, 2017

Please review. The error is a rubocop offense that passed locally.

spec/models/game_spec.rb:41:14: C: Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
puts "Missing piece"
^^^^^^^^^^^^^^^

self
# if there are already pieces in this game,
# we don't want the game to be populated again.
if pieces.count > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Can do this as a guard statement on first line of method

return unless pieces.count == 0

@mscoutermarsh
Copy link
Contributor

For puts "Missing piece"

Can change it to puts 'Missing piece'. Or remove that line, was probably in there to help someone debug. But not necessary anymore.

@sylyu sylyu merged commit 794bb52 into master Feb 25, 2017
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.

None yet

2 participants