Class: Dish::Plate
- Inherits:
-
Object
- Object
- Dish::Plate
- Defined in:
- lib/dish/plate.rb
Instance Method Summary collapse
-
#initialize(hash) ⇒ Plate
constructor
A new instance of Plate.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/dish/plate.rb', line 7 def method_missing(method, *args, &block) method = method.to_s if method.end_with?("?") key = method[0..-2] dish_check_for_presence(key) else dish_get_value(method) end end |