Class: Pageflow::ImageFileCssBackgroundImageUrls Private

Inherits:
Object
  • Object
show all
Defined in:
app/models/pageflow/image_file_css_background_image_urls.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#call(image_file, entry:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/models/pageflow/image_file_css_background_image_urls.rb', line 4

def call(image_file, entry:)
  {
    default: {
      desktop: image_file.ready? ? image_file.attachment.url(desktop_style(entry)) : '',
      mobile: image_file.ready? ? image_file.attachment.url(:medium) : ''
    },
    panorama: {
      desktop: image_file.ready? ? image_file.attachment.url(:panorama_large) : '',
      mobile: image_file.ready? ? image_file.attachment.url(:panorama_medium) : ''
    }
  }
end