Skip to content

Instantly share code, notes, and snippets.

@laginha87
Created May 2, 2018 18:19
Show Gist options
  • Save laginha87/9d5bb876095e27f615a37bf93ba7ec31 to your computer and use it in GitHub Desktop.
Save laginha87/9d5bb876095e27f615a37bf93ba7ec31 to your computer and use it in GitHub Desktop.
Method Missing
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