Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Created February 6, 2015 04:25
Show Gist options
  • Save KamilLelonek/f4bf2f72a940873ad7a6 to your computer and use it in GitHub Desktop.
Save KamilLelonek/f4bf2f72a940873ad7a6 to your computer and use it in GitHub Desktop.
Ruby constructor arguments names
class Foo
def initialize(foo:, bar:) end
end
Foo.new(foo: 1, bar: false)
################################
class Bar
def initialize(foo, bar) end
end
Bar.new(foo = 1, bar = false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment