Refactor + add example requests file

This commit is contained in:
Martin Lensment 2014-08-14 13:46:37 +03:00
parent 034adb616c
commit 3875e5f18a
5 changed files with 106 additions and 28 deletions

View file

@ -13,9 +13,10 @@ module Epp
end
end
def epp_plain_request filename
def epp_plain_request(data, type=:filename)
begin
parse_response(server.send_request(read_body(filename)))
return parse_response(server.send_request(read_body(data))) if type == :filename
return parse_response(server.send_request(data))
rescue Exception => e
e
end