Class: Katello::HostSubscriptionPresenter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pool:, entitlement:) ⇒ HostSubscriptionPresenter

Returns a new instance of HostSubscriptionPresenter.



5
6
7
8
# File 'app/presenters/katello/host_subscription_presenter.rb', line 5

def initialize(pool:, entitlement:)
  @quantity_consumed = entitlement.try(:[], :quantity)
  super(pool)
end

Instance Attribute Details

#quantity_consumedObject (readonly)

Returns the value of attribute quantity_consumed.



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

def quantity_consumed
  @quantity_consumed
end