Class: Katello::Subscription

Inherits:
Model
  • Object
show all
Includes:
Glue::Candlepin::CandlepinObject, Glue::Candlepin::Subscription, Authorization::Subscription
Defined in:
app/models/katello/subscription.rb

Instance Method Summary collapse

Methods included from Authorization::Subscription

#readable?

Methods inherited from Model

#destroy!

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'app/models/katello/subscription.rb', line 19

def active?
  pools.any?(&:active?)
end

#expiring_soon?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'app/models/katello/subscription.rb', line 23

def expiring_soon?
  pools.any?(&:expiring_soon?)
end

#recently_expired?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'app/models/katello/subscription.rb', line 27

def recently_expired?
  pools.any?(&:recently_expired?)
end

#redhat?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/models/katello/subscription.rb', line 15

def redhat?
  self.products.any? { |product| product.redhat? }
end