Sha256: b2c4a83ba2908290b37fae8e0b8a66ed39789b9184c15be488b31ec6c5f1890d

Contents?: true

Size: 281 Bytes

Versions: 60

Compression:

Stored size: 281 Bytes

Contents

module Katello
  class ActivationKeySubscriptionsPresenter < SimpleDelegator
    attr_reader :quantity_attached

    def initialize(pool, key_pools)
      @quantity_attached ||= key_pools.find { |sub| sub['id'] == pool.cp_id }.try(:[], :amount)
      super(pool)
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
katello-3.11.2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.10.2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.10.1.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.10.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.11.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.11.0 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.11.0.rc2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.11.0.rc1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.10.0 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.10.0.rc1.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.9.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.10.0.rc1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.9.0 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.8.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.9.0.rc2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.9.0.rc1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.7.1.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.7.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.8.0 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.8.0.rc3 app/presenters/katello/activation_key_subscriptions_presenter.rb