Last active
April 29, 2020 03:46
-
-
Save AlexKalinin/8e86267dfa915a12516b877bbadf7a2a 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
def foo(p1:, p2:, p3:) | |
puts "p1: #{p1}" | |
puts "p2: #{p2}" | |
puts "p3: #{p3}" | |
end | |
def bar | |
h1 = { p1: 11, p2: 22, p3: 33 } | |
foo h1 | |
end | |
def baz | |
h2 = { p2: 22, p3: 33, p1: 11 } | |
foo h2 | |
end | |
# 2.5.1: (main):0 > zze(:bar) | |
# p1: 11 | |
# p2: 22 | |
# p3: 33 | |
# 2.5.1: (main):0 > zze(:baz) | |
# p1: 11 | |
# p2: 22 | |
# p3: 33 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment