ruby-uebungen/Assignment_016/solution/readme.md

12 lines
431 B
Markdown

# Lösung: Monkey Patch
<div style="border: 1px solid grey;"><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></div>```ruby
class String
def to_leet
self.tr('aeiou', '43107')
end
end
print "hello leet".to_leet # => h3ll0 l337
```