lib/survey_gizmo/rest_response.rb in survey-gizmo-ruby-2.0.1 vs lib/survey_gizmo/rest_response.rb in survey-gizmo-ruby-3.0.3

- old
+ new

@@ -13,12 +13,12 @@ # SurveyGizmo returns date information in EST, but does not # provide time zone information in their API responses. # # See https://surveygizmov4.helpgizmo.com/help/article/link/date-and-time-submitted - unless datum["datesubmitted"].blank? - datum["datesubmitted"] = datum["datesubmitted"] + " EST" + unless datum['datesubmitted'].blank? + datum['datesubmitted'] = datum['datesubmitted'] + ' EST' end datum.keys.grep(/^\[/).each do |key| next if datum[key].nil? || datum[key].length == 0 @@ -53,17 +53,16 @@ @parsed_response['result_ok'] && @parsed_response['result_ok'].to_s.downcase == 'true' end # The parsed JSON data of the response def data - @_data ||= @parsed_response['data'] #|| {'id' => @parsed_response['id']} + @_data ||= @parsed_response['data'] end # The error message if there is one def message @_message ||= @parsed_response['message'] end - private def cleanup_attribute_name(attr) attr.downcase.gsub(/[^[:alnum:]]+/, '_')