Module: Dilation::Utils::Events::ClassMethods
- Defined in:
- lib/dilation/utils/events.rb
Instance Method Summary collapse
-
#event(*names) ⇒ Object
Defines one or more events with the name and the __name variant.
Instance Method Details
#event(*names) ⇒ Object
Defines one or more events with the name and the __name variant
32 33 34 35 36 37 |
# File 'lib/dilation/utils/events.rb', line 32 def event(*names) names.each do |name| define_method(name) { fire name } alias_method :"__#{name}", name end end |