Skip to content

Instantly share code, notes, and snippets.

@deviation
Last active June 21, 2016 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deviation/cd9eea84f16c38537ec9443b0a221ed4 to your computer and use it in GitHub Desktop.
Save deviation/cd9eea84f16c38537ec9443b0a221ed4 to your computer and use it in GitHub Desktop.
def foo(bar: 'barDefault', baz: 'bazDefault', fizz: 'fizzDefault')
puts "bar: " + bar
puts "baz: " + baz
puts "fizz: " + fizz
end
myData1 = { "bar" => "bar data", "baz" => "baz data"}
#For myData1: would like to know if there's shorthand for:
foo(bar: myData['bar'], baz: myData['baz'])
myData2 = {}
#for myData2: would like to call:
foo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment