Class: Katello::ProductContentPresenter
- Inherits:
-
Object
- Object
- Katello::ProductContentPresenter
- Defined in:
- app/presenters/katello/product_content_presenter.rb
Instance Attribute Summary collapse
-
#overrides ⇒ Object
Returns the value of attribute overrides.
-
#product_content ⇒ Object
Returns the value of attribute product_content.
Instance Method Summary collapse
- #enabled_override ⇒ Object
-
#initialize(product_content, overrides) ⇒ ProductContentPresenter
constructor
A new instance of ProductContentPresenter.
Constructor Details
#initialize(product_content, overrides) ⇒ ProductContentPresenter
Returns a new instance of ProductContentPresenter.
6 7 8 9 |
# File 'app/presenters/katello/product_content_presenter.rb', line 6 def initialize(product_content, overrides) @product_content = product_content @overrides = overrides end |
Instance Attribute Details
#overrides ⇒ Object
Returns the value of attribute overrides.
3 4 5 |
# File 'app/presenters/katello/product_content_presenter.rb', line 3 def overrides @overrides end |
#product_content ⇒ Object
Returns the value of attribute product_content.
3 4 5 |
# File 'app/presenters/katello/product_content_presenter.rb', line 3 def product_content @product_content end |
Instance Method Details
#enabled_override ⇒ Object
11 12 13 14 |
# File 'app/presenters/katello/product_content_presenter.rb', line 11 def enabled_override override = overrides.find { |pc| pc[:contentLabel] == content.label } override.nil? ? 'default' : override[:value] end |