Sha256: bb795d32c073ea57822278d47c2b280f4265d491cec027d6b181175248013b25
Contents?: true
Size: 431 Bytes
Versions: 10
Compression:
Stored size: 431 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.join("public/#{path}").to_s : "/#{path}" end end end
Version data entries
10 entries across 10 versions & 1 rubygems