I’ve read way too many blog posts about inheritance versus composition. All of them revolving around the is-a versus has-a relationship. If that subtlety has left you scratching your head, here’s a real life example.
Ruby has a handful of constructs used to bundle repeatable code: methods, blocks, Procs, and lambdas. While overlapping behaviors apply to all of these, each type has unique optimizations and usage.
Rails protects you against CSRF attacks, but it gives you a lot of customisation on how you want to react to them. It can be a great thing as you can have your own strategies, but it can also lead to security issues.