Sha256: d180c643bb99934e3f564d3acf301d851662568bfcc2992d38442fb097441cac
Contents?: true
Size: 1020 Bytes
Versions: 8
Compression:
Stored size: 1020 Bytes
Contents
module Pageflow # @api private class CustomizedTheme < SimpleDelegator def initialize(theme, overrides, files) super(theme) @options = __getobj__.options.deep_merge(overrides || {}) @files = files end attr_reader :options, :files def self.find(entry:, theme:) build( entry: entry, theme: theme, theme_customization: Pageflow.theme_customizations.get( site: entry.site, entry_type_name: entry.type_name ) ) end def self.build(entry:, theme:, theme_customization:) config = Pageflow.config_for(entry) new(theme, config.transform_theme_customization_overrides.call( theme_customization.overrides, entry: entry, theme: theme ), config.transform_theme_customization_files.call( theme_customization.selected_files.transform_values(&:urls), entry: entry, theme: theme )) end end end
Version data entries
8 entries across 8 versions & 1 rubygems