Module: DhEasy::Core::Plugin::InitializeHook
- Defined in:
- lib/dh_easy/core/plugin/initialize_hook.rb
Instance Method Summary collapse
-
#initialize_hooks(opts = {}) ⇒ Object
Execute all methods with `initilaize_hook_` prefix (hooks).
Instance Method Details
#initialize_hooks(opts = {}) ⇒ Object
Execute all methods with `initilaize_hook_` prefix (hooks).
8 9 10 11 12 13 |
# File 'lib/dh_easy/core/plugin/initialize_hook.rb', line 8 def initialize_hooks opts = {} initializers = self.methods.select{|i|i.to_s =~ /^initialize_hook_/} initializers.each do |method| self.send method, opts end end |