Class: Performance
- Defined in:
- lib/performance_promise/performance.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call(this, *args) ⇒ Object
-
#initialize(klass, method, options) ⇒ Performance
constructor
A new instance of Performance.
Methods inherited from Decorator
Constructor Details
#initialize(klass, method, options) ⇒ Performance
Returns a new instance of Performance.
5 6 7 8 |
# File 'lib/performance_promise/performance.rb', line 5 def initialize(klass, method, ) @klass, @method = klass, method PerformancePromise.promises["#{klass}\##{method.name.to_s}"] = end |
Instance Method Details
#call(this, *args) ⇒ Object
10 11 12 |
# File 'lib/performance_promise/performance.rb', line 10 def call(this, *args) @method.bind(this).call(*args) end |