Module: Callback::ModuleMethods
- Included in:
- Module
- Defined in:
- lib/spec/callback/extensions/module.rb
Instance Method Summary collapse
-
#callback_events(*event_names) ⇒ Object
For each event_name submitted, defines a callback event with this name.
Instance Method Details
#callback_events(*event_names) ⇒ Object
For each event_name submitted, defines a callback event with this name. Client code can then register as a callback listener using object.event_name.
5 6 7 8 9 |
# File 'lib/spec/callback/extensions/module.rb', line 5 def callback_events(*event_names) event_names.each do |event_name| define_callback_event(event_name) end end |