Keyword Args — the killer Ruby feature you aren't using
summary
Ruby 2.0 and 2.3 keyword arguments make functions strictly more flexible than positional args, letting optional params be passed out of order, default values refer to earlier kwargs, and hashes splat into kwargs; that enables dependency injection and loose coupling in controllers (headers and stripes options added without changing callers). A discovered pattern, the Context Funnel using **kwargs passthrough, lets deep view code receive new options without rewriting intermediates, and it works in real rendering and SQL-building examples.
AI-written summary · about
chapters (4)
related talks
30mRuby keyword args and the options hash, from the parser to the virtual machine
29mEvolution Of Keyword Parameters
53mRuby 2 in Ruby on Rails
40mMake Ruby Functional Again!
34mHijacking Ruby Syntax in Ruby
32mRefinements - the Worst Feature You Ever Loved
38mDiscover Modern Ruby features
34mThe Modern Rubyist: When and How to Use the Latest Features
