-
Notifications
You must be signed in to change notification settings - Fork 11
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
Alora Riley #2
base: main
Are you sure you want to change the base?
Alora Riley #2
Conversation
@candidates = [] | ||
end | ||
|
||
def register_candidate!(candidate_info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the ! operator doing here?
end | ||
|
||
describe '#votes' do | ||
it 'has zero votes by default' do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice test to check the initial state of things
return @races | ||
end | ||
|
||
def add_candidate_to_election(candidate_info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method appears to be doing almost the same thing as register candidate - do you need both?
end | ||
|
||
def candiate_name(candidates) | ||
candidates.map do |candiate| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If my map or enum is simple like this - I really like to use the shorter syntax!
Since we worked on the battleship project all week, I got to this IC and I felt like I was typing so slowly through it. I didn't finish the last two methods of iteration 3. The reaching through objects and creating a hash with them felt challenging.