07/03/19

#### Prefer composition over inheritance?

Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?

06/13/19

#### Safe integer parsing in Ruby?

I have a string, say '123', and I want to convert it to 123.I know you can simply do some_string.to_i, but that converts 'lolipops' to 0, which is not the effect I have in mind. I want it... more

06/12/19

#### Map and Remove nil values in Ruby?

I have a map which either changes a value or sets it to nil. I then want to remove the nil entries from the list. The list doesn't need to be kept.This is what I currently have:<!-- language:... more

05/22/19

#### In Ruby, how do I skip a loop in a .each loop, similar to 'continue'?

In Ruby, how do I skip a loop in a .each loop, similar to continue in other languages?

## Still looking for help? Get the right answer, fast.

Get a free answer to a quick problem.
Most questions answered within 4 hours.

#### OR

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.