class SynergyWholesale::ResponseGenerator

Public Instance Methods

build_response(command_name, response, soap_command) click to toggle source
# File lib/synergy_wholesale/response_generator.rb, line 6
def build_response(command_name, response, soap_command)
  get_response_class(command_name).new(response, soap_command)
end

Protected Instance Methods

get_response_class(command_name) click to toggle source
# File lib/synergy_wholesale/response_generator.rb, line 12
def get_response_class(command_name)
  response_class = command_name.gsub('Command', 'Response')
  Inflector.constantize(response_class)
end