Recurring Moment Debugging Challenge

Introduction

recurring_moment.rb has a broken implementation of RecurringMoment. There is a correct suite of RSpec tests for the class. Fix the module so that the tests pass!

Getting Started

  • bundle install to install the dependencies
  • rspec recurring_moment_spec.rb to run the full suite of tests
  • rspec recurring_moment_spec.rb:[line_number] to run a single line

Go ahead and edit the code in recurring_moment.rb to make the module work!

Bonus

  • What's the runtime of the match function?
  • How could you improve this method?