Class: Maglev::FetchSectionScreenshotUrl

Inherits:
Object
  • Object
show all
Includes:
Injectable
Defined in:
app/services/maglev/fetch_section_screenshot_url.rb

Instance Method Summary collapse

Instance Method Details

#callObject



12
13
14
15
16
17
# File 'app/services/maglev/fetch_section_screenshot_url.rb', line 12

def call
  return nil unless section.local_screenshot?

  screenshot_path = fetch_section_screenshot_path.call(section: section) + query_string
  asset_host ? URI.join(asset_host, screenshot_path).to_s : screenshot_path
end