Understanding Idempotence in Ruby
In this guide you will learn how to understand idempotence.
Guide Tasks
- Read Tutorial
- Complete the Exercise
Summary
Build out a method that will understand indempotent methods.
Exercise Description
"Define a method that will describe idempotent methods and convert unicode characters and ignore cases to match usernames. "
Example Data
' supplied_username_one = "myusernᵃme".username_cleaner supplied_username_two = "myusername".username_cleaner database_username = "MYUSERNAME" ' -> expect(supplied_username_one == database_username).to eq(true) expect(supplied_username_two == database_username).to eq(true)
Real World Usage
It can be necessary to clean up given data before or as we compare it to out database to make sure we get the desired results returned to us.