ruby-exercises icon indicating copy to clipboard operation
ruby-exercises copied to clipboard

Recursion Exercise: Add `#contains?` exercise

Open JoshDevHub opened this issue 11 months ago • 0 comments

Because

I'm working on adding Recursion Exercises to this repo because we determined it'd be beneficial to have this content in-house. See the linked issue for more information.

This PR

  • Adds an exercise, tests, and a solution for a method called #contains?. This method takes in a hash, which may be nested, and recursively searches the structure for the provided value.

Issue

Related to #114

Pull Request Requirements

  • [x] I have thoroughly read and understand The Odin Project Contributing Guide
  • [x] The title of this PR follows the location of change: brief description of change format, e.g. Data types exercise: Update spec files
  • [x] The Because section summarizes the reason for this PR
  • [x] The This PR section has a bullet point list describing the changes in this PR
  • [x] If this PR addresses an open issue, it is linked in the Issue section
  • [x] If this PR includes changes that needs to be updated on the solutions branch, I have created another PR (and linked it to this PR).

JoshDevHub avatar Feb 11 '25 19:02 JoshDevHub