Sha256: f5f27b46b023bea2cf1170ee4a35231ba3fd8004032acfbea966ec3cd09f794e
Contents?: true
Size: 423 Bytes
Versions: 15
Compression:
Stored size: 423 Bytes
Contents
# frozen_string_literal: true module Maglev class FetchSectionScreenshotPath include Injectable dependency :fetch_sections_path argument :theme, default: nil argument :section argument :absolute, default: false def call path = "#{fetch_sections_path.call(theme: theme)}/#{section.category}/#{section.id}.jpg" absolute ? "#{Rails.root}/public/#{path}" : "/#{path}" end end end
Version data entries
15 entries across 15 versions & 1 rubygems