Created
May 2, 2018 18:19
-
-
Save laginha87/9d5bb876095e27f615a37bf93ba7ec31 to your computer and use it in GitHub Desktop.
Method Missing
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
macro method_missing(call) | |
{{call.args}}.reduce {|a,b| a + b } | |
end | |
puts(sum 1,2,3,4,5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment