@StatelessCode
  @StatelessCode
Stateless Code | Codecast: Create a RubyGem 78: Allow Advantage and Bonus Combinations @StatelessCode | Uploaded October 2021 | Updated October 2024, 4 hours ago.
This is the 78th video in the NerdDice create a RubyGem series. In this video Mike implements the functionality that allows the advantage/disadvantage mechanic to be combined with the bonus/penalty in the ConvenienceMethods module. After the specs pass the affected methods are refactored to reduce line length and repeated code.

This video covers:
00:00:12 Introduction and overview of approach
00:02:44 Start writing specs for the use cases
00:12:53 Adapt regular expressions in ConvenienceMethods
00:14:30 Write private get_modifier_from_method_name method
00:16:55 Adapt existing highest/lowest methods to include modifier
00:19:12 Run RSpec. All specs passing. Test drive in console.
00:21:25 Fix RuboCop offenses
00:28:16 Refactor methods covered in this episode to reduce method length
00:36:00 RuboCop is happy. Commit, push, update backlog.


This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Codecast: Create a RubyGem 78: Allow Advantage and Bonus CombinationsGive Yourself OptionsCodecast: statelesscode.com WordPress 16: Move the Footer Widget Back to the FooterExploring My Table Top Role-Playing User PersonaCreate a RubyGem 89: Add Ruby 3.2 to GitHub Actions and Update RSpec to a compatible versionAdd UUID Support and Generate the Devise User ModelMigrate from SFDX CLI version 7.x to Salesforce CLI version 2.xAdd Code Climate to Project and Allow for Browser Test Driver OptionsInstall Windows Subsystem for Linux 2 (WSL2) and Set Up Remote Development for Visual Studio CodeCodecast: Getting Started with Rails 7 10: Destroy an Article and Get it Working with TurboCreate a RubyGem 94: Fix a Cognitive Complexity Code Smell from Code ClimateConfigure Devise Settings and Add Environment-Specific Rails Credentials

Codecast: Create a RubyGem 78: Allow Advantage and Bonus Combinations @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER