summaryrefslogtreecommitdiff
path: root/lib/nickserver/key_response.rb
blob: 438dfc36a40eaad7d388b38c09e1685438ac513a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Nickserver
  class KeyResponse
    attr_reader :status, :content

    def initialize(uid, key)
      @content = format_response(address: uid, openpgp: key)
      @status = 200
    end

    protected

    def format_response(map)
      map.to_json
    end
  end
end