Sha256: ce803a62de978d144bc3929f27dee38968e5d506f73d08d3724dc589239cbd8a
Contents?: true
Size: 702 Bytes
Versions: 10
Compression:
Stored size: 702 Bytes
Contents
module Katello class ProductContentPresenter attr_accessor :product_content, :overrides delegate :content, :enabled, :product, :to => :product_content def initialize(product_content, overrides) @product_content = product_content @overrides = overrides end def override override = overrides.find { |pc| pc.content_label == content.label && pc.name == "enabled" } override.nil? ? 'default' : override.value end def enabled_content_override overrides.find { |pc| pc.content_label == content.label && pc.name == "enabled" } end def content_overrides overrides.select { |pc| pc.content_label == content.label } end end end
Version data entries
10 entries across 10 versions & 1 rubygems