lib/creditsafe/base_model.rb in creditsafe_connect-0.1.2 vs lib/creditsafe/base_model.rb in creditsafe_connect-0.1.3

- old
+ new

@@ -54,11 +54,11 @@ def key_transformer CamelizerLower end - # Sets all the instance variables by reading the JSON from Creditsafe and converting the keys from - # camelCase to snake_case, as it's the standard in Ruby. + # Sets all the instance variables by reading the JSON from Creditsafe and converting the keys + # from camelCase to snake_case, as it's the standard in Ruby. def build(json: {}, key_transformer: self.key_transformer) new.tap do |record| attributes.each do |attr| key = attribute_aliases.key?(attr) ? attribute_aliases[attr] : attr record.public_send("#{attr}=", json[key_transformer.transform(key)])