Part 3. Ruby dynamics
Ruby is dynamic, like human nature.
Matz, at RubyConf 2001
The phrase Ruby dynamics is almost redundant: everything about Ruby is dynamic. Variables don’t care what class of object you bind them to, which means you don’t have to (indeed, you can’t) declare their type in advance. Objects get capabilities from the classes that create them but can also branch away from their classes by having individual methods added to them. Classes and modules can be reopened and modified after their initial definitions. Though Ruby is a language of objects, it can also be built with a functional mindset to produce beautiful and expressive code. Ruby is dynamic enough even to support both functional and object-oriented programming paradigms! ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access