Thoughts

mental health break ,./'"**^^$_---
`foo(:bar)` in Ruby passes the symbol `:bar` to the function `foo` `foo(bar:)` in Ruby is syntax sugar for `foo({ :bar => bar })`, creating
a hash with the key `:bar` and the value as the value of the method/variable. `foo(:one, two:)` is valid Ruby but `foo(one:, :two)` is a syntax error (implicit hashes need to be the last argument to a function). `foo :one, two: :three, four:` is syntax sugar for `foo(:one, { :two => :three, :four => four })`
Link 1:23 p.m. Apr 15, 2024 UTC-4