Created
November 4, 2015 17:04
-
-
Save jordanhudgens/258bad80e3ff1c24c945 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Baseball | |
end | |
p Baseball.new.swing | |
class Baseball | |
end | |
class Baseball | |
def swing | |
"Homerun!" | |
end | |
end | |
p Baseball.new.swing | |
class String | |
def censor(bad_word) | |
self.gsub! "#{bad_word}", "CENSORED" | |
end | |
def num_of_chars | |
size | |
end | |
end | |
p "The bunny was in trouble with the king bunny".censor("bunny") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment