Class: Katello::ActivationKeySubscriptionsPresenter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Katello::ActivationKeySubscriptionsPresenter
- Defined in:
- app/presenters/katello/activation_key_subscriptions_presenter.rb
Instance Attribute Summary collapse
-
#quantity_attached ⇒ Object
readonly
Returns the value of attribute quantity_attached.
Instance Method Summary collapse
-
#initialize(pool, key_pools) ⇒ ActivationKeySubscriptionsPresenter
constructor
A new instance of ActivationKeySubscriptionsPresenter.
Constructor Details
#initialize(pool, key_pools) ⇒ ActivationKeySubscriptionsPresenter
Returns a new instance of ActivationKeySubscriptionsPresenter.
5 6 7 8 |
# File 'app/presenters/katello/activation_key_subscriptions_presenter.rb', line 5 def initialize(pool, key_pools) @quantity_attached = key_pools.find { |sub| sub['id'] == pool.cp_id }.try(:[], :amount) super(pool) end |
Instance Attribute Details
#quantity_attached ⇒ Object (readonly)
Returns the value of attribute quantity_attached.
3 4 5 |
# File 'app/presenters/katello/activation_key_subscriptions_presenter.rb', line 3 def quantity_attached @quantity_attached end |