def each
      begin
        loop do
          event = read
          if event
            next unless ALLOWED_EVENT_TYPES.include?(event.type)
            yield event
          end
        end
      rescue Errno::ENODEV
      end
    end
def each
      begin
        loop do
          event = read
          if event
            next unless ALLOWED_EVENT_TYPES.include?(event.type)
            yield event
          end
        end
      rescue Errno::ENODEV
      end
    end
Expose each event to a block of code as it comes in.