Created
August 20, 2020 06:26
-
-
Save yano3nora/c09b8a567f89f6e80cb96a892da14bc2 to your computer and use it in GitHub Desktop.
[ruby: Keyword Args] #ruby
This file contains 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
# https://qiita.com/jnchito/items/74e0930c54df90f9704c | |
def buy_burger(menu, drink: true, potato: true) | |
if drink | |
# ... | |
end | |
if potato | |
# ... :potato じゃないので注意ね | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment