Sha256: ad2120829a64f92cb63c818949bf53fbfff65dd61f374a028416ade2c12b0a3f

Contents?: true

Size: 458 Bytes

Versions: 27

Compression:

Stored size: 458 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 enabled_override
      override = overrides.find { |pc| pc[:contentLabel] == content.label }
      override.nil? ? 'default' : override[:value]
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
katello-3.0.1 app/presenters/katello/product_content_presenter.rb
katello-3.0.0 app/presenters/katello/product_content_presenter.rb
katello-3.0.0.rc7 app/presenters/katello/product_content_presenter.rb
katello-3.0.0.rc5 app/presenters/katello/product_content_presenter.rb
katello-3.0.0.rc4 app/presenters/katello/product_content_presenter.rb
katello-3.0.0.rc3 app/presenters/katello/product_content_presenter.rb
katello-3.0.0.rc2 app/presenters/katello/product_content_presenter.rb