summaryrefslogtreecommitdiff
path: root/lib/nickserver/request_handlers/hkp_email_handler.rb
blob: 3d39a4e0d312660e57e0b9e5b0c012164913be9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'nickserver/email_address'
require 'nickserver/hkp/source'

module Nickserver
  module RequestHandlers
    class HkpEmailHandler < Base
      def handle
        source.query(email) if request.email
      end

      protected

      def email
        @email ||= EmailAddress.new(request.email)
      end

      def source
        Nickserver::Hkp::Source.new adapter
      end
    end
  end
end