Ruby Niceties

Delegate arguments

def parent_method(...)
  child_method(...)
end

instead of

def parent_method(*args, **options, &block)
  child_method(*args, **options, &block)
end

Since Ruby 2.7: Feature#16253.

Initialize Struct with keyword arguments

User = Struct.new(:name, :handle, keyword_init: true)
User.new(name: "Juanito Fatas", handle: "JuanitoFatas")

Since Ruby 2.5: Feature#11925.