Method: Vinquery#create_exception

Defined in:
lib/vinquery.rb

#create_exceptionObject



62
63
64
65
# File 'lib/vinquery.rb', line 62

def create_exception
  @doc.css('message').each{|msg| @errors << {msg.attributes['key'].value => msg.attributes['value'].value} }
  VinqueryException.new(@errors.map{|msg| "#{msg.keys[0]}: #{msg.values[0]}"}.join("\n")) unless @errors.empty?
end