533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
|
# File 'lib/cloudinary/utils.rb', line 533
def self.generate_responsive_breakpoints_string(breakpoints)
return nil if breakpoints.nil?
breakpoints = build_array(breakpoints)
breakpoints.map do |breakpoint_settings|
unless breakpoint_settings.nil?
breakpoint_settings = breakpoint_settings.clone
transformation = breakpoint_settings.delete(:transformation) || breakpoint_settings.delete("transformation")
format = breakpoint_settings.delete(:format) || breakpoint_settings.delete("format")
if transformation
transformation = Cloudinary::Utils.generate_transformation_string(transformation.clone, true)
end
breakpoint_settings[:transformation] = [transformation, format].compact.join("/")
end
breakpoint_settings
end.to_json
end
|