Module: ClassX::Pluggable::Plugin::AutoRegister
- Defined in:
- lib/classx/pluggable/plugin.rb
Constant Summary collapse
- EVENT_REGEX =
/\Aon_(.+)\z/
Instance Method Summary collapse
Instance Method Details
#register ⇒ Object
57 58 59 60 61 62 |
# File 'lib/classx/pluggable/plugin.rb', line 57 def register methods.map {|meth| meth.to_s }.grep(EVENT_REGEX).each do |meth| meth =~ EVENT_REGEX add_event $1.upcase, meth end end |