11 Matching Annotations
  1. Sep 2024
    1. mount IndexController do # all methods will be mounted automatically, it's just an example of refinement get '/hello', :hello_world end
  2. Feb 2024
  3. Sep 2023
  4. Jun 2023
    1. I’ve heard-suggested that ActiveSupport, which does a ton of monkey-patching of core classes, would make potentially-nice refinements. I don’t hold this opinion strongly, but I disagree with that idea. A big value proposition of ActiveSupport is that it is “omnipresent” and sets a new baseline for ruby behaviors - as such, being global really makes the most sense. I don’t know that anyone would be pleased to sprinkle using ActiveSupport in all their files that use it - they don’t even want to THINK about the fact that they’re using it.
    2. Let’s check out what the refinement approach looks like and why I consider it the best way to implement conversion wrappers.
    3. in the 10 years since they have been a part of Ruby, real life usages are astonishingly rare.
  5. Apr 2022
    1. I'm a big fan of refinements (yes, I am), and that's what I did to make this code look simpler and more beautiful:
  6. Jul 2020