class DNN::Callbacks::LambdaCallback
This callback wrap the lambda function.
Public Class Methods
new(event, &block)
click to toggle source
@param [Symbol] event Event to execute callback. @yield Register the contents of the callback.
# File lib/dnn/core/callbacks.rb, line 32 def initialize(event, &block) instance_eval do define_singleton_method(event) { block.call } end end