diff options
author | Azul <azul@riseup.net> | 2016-06-09 11:54:04 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-06-09 11:54:04 +0200 |
commit | 80d85a0396fb0dbb27ac1b0885d5461ccc0cfbf2 (patch) | |
tree | 961c56684918ce59712c0a87dc973f35f7d926fa /lib/nickserver/hkp | |
parent | 25e80931939fe31b4a451281f0772f085acc7f9f (diff) |
refactor: introduce Hkp::Response
Diffstat (limited to 'lib/nickserver/hkp')
-rw-r--r-- | lib/nickserver/hkp/response.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/nickserver/hkp/response.rb b/lib/nickserver/hkp/response.rb new file mode 100644 index 0000000..c52e25f --- /dev/null +++ b/lib/nickserver/hkp/response.rb @@ -0,0 +1,18 @@ +module Nickserver::Hkp + class Response + + 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 |