Sha256: ba54d7c10b9180c9746b1082659be44fade4b1253905f49b5dfed04350f4fd8a

Contents?: true

Size: 476 Bytes

Versions: 14

Compression:

Stored size: 476 Bytes

Contents

module AeEasy
  module Core
    module Plugin
      module InitializeHook
        # Execute all methods with `initilaize_hook_` prefix (hooks).
        #
        # @param [Hash] opts ({}) Configuration options sent to all hooks.
        def initialize_hooks opts = {}
          initializers = self.methods.select{|i|i.to_s =~ /^initialize_hook_/}
          initializers.each do |method|
            self.send method, opts
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ae_easy-core-0.2.0 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.9 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.8 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.7 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.6 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.5 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.4 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.3 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.2 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.1 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.1.0 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.0.5 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.0.4 lib/ae_easy/core/plugin/initialize_hook.rb
ae_easy-core-0.0.3 lib/ae_easy/core/plugin/initialize_hook.rb