This document discusses key differences between Ruby objects and objects in other languages. It covers 7 main points: 1) Ruby allows syntax omission; 2) Ruby uses accessor methods instead of properties; 3) operators are methods; 4) Ruby supports open classes; 5) Ruby enables meta-programming through techniques like class_eval; 6) Ruby uses modules for multiple inheritance and mixins; 7) Ruby does not enforce private and protected methods in the same way as other languages. The document provides pros and cons for each point and emphasizes how Ruby's flexibility allows for abstraction, reduced duplication, and extensibility of objects.
10. Pros
1. Make your codes more readable to a human.
(model validation, routes, rspec, view helper)
Cons
1. High learning curve for beginners.
(Easy to misunderstanding)
11. 2. No REAL property
class/instance variables
and
method instead.
22. Pros
1. Split logics to different level and make your business logic clean.
2. Increase productive.
3. Follow DRY code principle like there is no limitation.
23. Cons
1. Hard to maintain (but it can be solve)
2. Hard to name variables and methods for abstraction behavior.
3. Hard to understand abstraction behavior codes from time to time.