Class: Degraderator

Inherits:
Object
  • Object
show all
Defined in:
lib/degraderator.rb

Instance Method Summary collapse

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