lib/nova/api/utils/base_struct.rb in nova-api-0.5.0 vs lib/nova/api/utils/base_struct.rb in nova-api-0.6.0

- old
+ new

@@ -17,14 +17,10 @@ self.class.const_get('ALLOWED_ATTRIBUTES').each do |key| next unless attributes.keys.include? key value = attributes[key] - if value.is_a? Array - data[key.to_sym] = value.map { |attribute| permit_value(key, attribute) } - else - data[key.to_sym] = permit_value(key, value) - end + data[key.to_sym] = value.is_a?(Array) ? value.map { |attribute| permit_value(key, attribute) } : permit_value(key, value) end data end