Class: DNN::Callbacks::LambdaCallback
- Defined in:
- lib/dnn/core/callbacks.rb
Overview
This callback wrap the lambda function.
Instance Attribute Summary
Attributes inherited from Callback
Instance Method Summary collapse
-
#initialize(event) { ... } ⇒ LambdaCallback
constructor
A new instance of LambdaCallback.
Constructor Details
#initialize(event) { ... } ⇒ LambdaCallback
Returns a new instance of LambdaCallback.
38 39 40 41 42 |
# File 'lib/dnn/core/callbacks.rb', line 38 def initialize(event, &block) instance_eval do define_singleton_method(event) { block.call } end end |