Class: Katello::ActivationKeySubscriptionPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/katello/activation_key_subscription_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#subscriptionObject

Returns the value of attribute subscription.



3
4
5
# File 'app/presenters/katello/activation_key_subscription_presenter.rb', line 3

def subscription
  @subscription
end