Class: Katello::ActivationKeySubscriptionPresenter
- Inherits:
-
Object
- Object
- Katello::ActivationKeySubscriptionPresenter
- Defined in:
- app/presenters/katello/activation_key_subscription_presenter.rb
Instance Attribute Summary collapse
-
#subscription ⇒ Object
Returns the value of attribute subscription.
Instance Method Summary collapse
-
#initialize(subscription) ⇒ ActivationKeySubscriptionPresenter
constructor
A new instance of ActivationKeySubscriptionPresenter.
Constructor Details
#initialize(subscription) ⇒ ActivationKeySubscriptionPresenter
Returns a new instance of ActivationKeySubscriptionPresenter.
5 6 7 8 |
# File 'app/presenters/katello/activation_key_subscription_presenter.rb', line 5 def initialize(subscription) @subscription = Katello::Pool.find_by(:cp_id => subscription["id"]) @subscription.quantity_attached = subscription.try(:[], :amount) end |
Instance Attribute Details
#subscription ⇒ Object
Returns the value of attribute subscription.
3 4 5 |
# File 'app/presenters/katello/activation_key_subscription_presenter.rb', line 3 def subscription @subscription end |