Sha256: 57b3ad5f9facbe82bccedfec8e8204c79f6bdf75419edb276fd60c419b658260

Contents?: true

Size: 346 Bytes

Versions: 1

Compression:

Stored size: 346 Bytes

Contents

# encoding: utf-8

module Hatetepe
  module Support
    module Handlers
      def setup_handlers
        @handlers = (@config[:handlers] || []).map(&:new)
      end

      def notify_handlers(hook, *args)
        @handlers.each do |handler|
          handler.send(hook, *args) if handler.respond_to?(hook)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hatetepe-0.6.0.pre.2 lib/hatetepe/support/handlers.rb