lib/chook/event/handled_event.rb
def handle
      handlers = Handlers.handlers[event_class_name]
      return "No handlers loaded for #{event_class_name} events" unless handlers.is_a? Array

      handlers.each do |handler|
        case handler
        when Pathname
          pipe_to_executable handler
        when Object
          handle_with_proc handler
        end # case
      end # @handlers.each do |handler|

      # the handle method should return a string,
      # which is the body of the HTTP result for
      # POSTing the event
      "Processed by #{handlers.count} general handlers"
    end
# Run all the general handlers for this event class
#
Run all the general handlers for this event class
Run all the general handlers for this event class
def handle
      handlers = Handlers.handlers[event_class_name]
      return "No handlers loaded for #{event_class_name} events" unless handlers.is_a? Array
      handlers.each do |handler|
        case handler
        when Pathname
          pipe_to_executable handler
        when Object
          handle_with_proc handler
        end 
      end 
      "Processed by #{handlers.count} general handlers"
    end
def handle handlers = Handlers . handlers [ event_class_name ] return "No handlers loaded for #{event_class_name} events" unless handlers . is_a? Array handlers . each do | handler | case handler when Pathname pipe_to_executable handler when Object handle_with_proc handler end end "Processed by #{handlers.count} general handlers" end
Run all the general handlers for this event class
Run all the general handlers for this event class
# case # @handlers.each do |handler| # the handle method should return a string, # which is the body of the HTTP result for # POSTing the event