Codecast: Create a RubyGem 38: Implement the Die class


This is the 38th video in the NerdDice create a RubyGem series. In this video, Mike implements the first iteration of the Die class to make the specs from the previous video pass.

This video covers:

  • 00:00:12 Introduction
  • 00:00:37 Add expectation about value of roll method to specs
  • 00:01:58 Create the Die class and get it properly required
  • 00:03:30 Write initialize method signature and troubleshoot bad option format in specs
  • 00:07:33 Start adding attributes to initialize and get our first green specs
  • 00:09:13 Muddle through getting the generator_override option to pass.
  • 00:22:10 Get the background and foreground color specs to pass
  • 00:25:43 Implement the roll method
  • 00:29:29 Add spec for error scenario of generator_override
  • 00:36:39 Add top-level class documentation comment
  • 00:37:16 Commit and push to the branch
  • 00:39:20 Add more items to backlog
  • 00:40:08 Respond to failed GitHub action by increasing ratio in benchmark suite
, , ,

Leave a Reply