Skip to content

Instantly share code, notes, and snippets.

@hokaccha
Last active December 19, 2015 14:58
Show Gist options
  • Save hokaccha/5972576 to your computer and use it in GitHub Desktop.
Save hokaccha/5972576 to your computer and use it in GitHub Desktop.
# CRuby
def foo(key: 'foo')
puts key
end
foo(key: 'hoge') #=> 'hoge'
# ruby motion(第一引数がないとSyntaxError)
def foo(a, key: val)
puts val
end
foo(1, key: 'hoge') #=> 'hoge'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment