def remove_listener(event, listener)
      event = event.to_sym

      fail "Unable to delete #{event} from #{inspect}" unless @listeners && @listeners[event]

      @listeners[event].delete(listener)

      last_for_event = @listeners[event].size == 0

      if last_for_event
        # No registered listeners now on this event
        @listeners.delete(event)
      end

      last = last_for_event && @listeners.size == 0

      # Let the class we're included on know that we removed a listener (if it cares)
      if self.respond_to?(:event_removed)
        # Pass in the event and a boolean indicating if it is the last event
        event_removed(event, last, last_for_event)
      end
    end
def remove_listener(event, listener)
      event = event.to_sym

      fail "Unable to delete #{event} from #{inspect}" unless @listeners && @listeners[event]

      @listeners[event].delete(listener)

      last_for_event = @listeners[event].size == 0

      if last_for_event
        # No registered listeners now on this event
        @listeners.delete(event)
      end

      last = last_for_event && @listeners.size == 0

      # Let the class we're included on know that we removed a listener (if it cares)
      if self.respond_to?(:event_removed)
        # Pass in the event and a boolean indicating if it is the last event
        event_removed(event, last, last_for_event)
      end
    end
Stops the listener returned by calling .on(:event_name)  Triggers #event_removed
 if there are no more listeners for that event.