ruby-uebungen/Assignment_015/solution/readme.md

13 lines
149 B
Markdown

# Lösung: Monkey Patch
```ruby
class String
def to_leet
self.tr('aeiou', '43107')
end
end
print "hello leet".to_leet # => h3ll0 l337
```