Ryan is an engineer in the Sacramento Area with a focus in Python, Ruby, and Rust. Bash/Python Exercism mentor. Coding, physics, calculus, music, woodworking. Looking for work!
This is an amazing post, thank you! I love learning about how Ruby works in more detail. I had to read it a couple times to really wrap my head around what was going on, but now I'm super excited to know about this pattern.
Once I figured out that the key piece of magic happens here:
defself.included(base)base.extendClassMethodsend
and what all of that does, everything clicked into place.
For anyone who needs a refresher on the differences between include and extend, I found this post by Léonard Hetsch to be helpful as well.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is an amazing post, thank you! I love learning about how Ruby works in more detail. I had to read it a couple times to really wrap my head around what was going on, but now I'm super excited to know about this pattern.
Once I figured out that the key piece of magic happens here:
and what all of that does, everything clicked into place.
For anyone who needs a refresher on the differences between include and extend, I found this post by Léonard Hetsch to be helpful as well.