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.8.0.rc2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.7.0 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.8.0.rc1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.7.0.rc2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.7.0.rc1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.5.2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.6.0 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.6.0.1.rc2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.6.0.rc2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.6.0.rc1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.5.1.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.5.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.5.0.1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.5.0 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.5.0.rc2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.5.0.rc1 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.4.5 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.4.4 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.4.2 app/presenters/katello/activation_key_subscriptions_presenter.rb
katello-3.4.1 app/presenters/katello/activation_key_subscriptions_presenter.rb