internetee-registry/app/controllers/epp/commands_controller.rb
Martin Lensment a23ac67b7f Refactor
2014-06-30 17:04:37 +03:00

19 lines
479 B
Ruby

class Epp::CommandsController < ApplicationController
include Epp::Common
include Epp::DomainsHelper
OBJECT_TYPES = {
'http://www.nic.cz/xml/epp/domain-1.4 domain-1.4.xsd' => 'domain'
}
private
def create
type = OBJECT_TYPES[parsed_frame.css('create create').attr('schemaLocation').value]
send("create_#{type}")
end
def check
type = OBJECT_TYPES[parsed_frame.css('check check').attr('schemaLocation').value]
send("check_#{type}")
end
end