Last active
November 23, 2018 16:18
-
-
Save kirillshevch/5e83c487e948f5d4895f763898104509 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Integer | |
def times_method | |
(0...self).each do |i| | |
yield(i) | |
end | |
return self | |
end | |
end | |
5.times_method { |i| i } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment