Bang vs Non Bang Method in Ruby
In this guide you will learn how to take in an argument and a word to censor and replaces the word with CENSORED.
Guide Tasks
- Read Tutorial
- Complete the Exercise
Summary
Build out a method that will describe censor vs censor!
Exercise Description
"Define a method that will create and exercise implementation for the bang vs non bang method."
Example Data
'sentence_one = 'The quick brown fox jumped over the lazy dog' sentence_two = 'The quick brown fox jumped over the lazy dog' censor!(sentence_one, 'fox') ' -> expect(sentence_one).to eq('The quick brown CENSORED jumped over the lazy dog') expect(censor(sentence_two, 'dog')).to eq('The quick brown fox jumped over the lazy CENSORED')
Real World Usage
This exercise will show you how you are able to change a word or set of words with using the bang method.