Class: Degraderator
- Inherits:
-
Object
- Object
- Degraderator
- Defined in:
- lib/degraderator.rb
Instance Method Summary collapse
-
#initialize(degrade, object) ⇒ Degraderator
constructor
A new instance of Degraderator.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(degrade, object) ⇒ Degraderator
Returns a new instance of Degraderator.
2 3 4 5 |
# File 'lib/degraderator.rb', line 2 def initialize(degrade, object) @degrade = degrade @object = object end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
7 8 9 |
# File 'lib/degraderator.rb', line 7 def method_missing(method, *args) @degrade.perform { @object.send(method, *args) } end |