Sha256: 3fca4ca347aab48521d6ea069d8f256f5e89df8c4f89e2774ff2075e64df8e77

Contents?: true

Size: 335 Bytes

Versions: 11

Compression:

Stored size: 335 Bytes

Contents

class ComplianceAlertCollection
  def initialize(criteria, apps, users)
    @criteria = criteria
    @apps = apps
    @users = users
  end

  def all
    context = { users: @users, apps: @apps }
    @criteria.map do |criterion|
      CriterionAlertDecorator.decorate(criterion, context: context).alerts || []
    end.flatten
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
aptible-rails-0.7.3 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.7.2 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.7.1 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.7.0 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.6.13 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.6.12 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.6.11 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.6.10 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.6.9 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.6.8 lib/aptible/rails/models/compliance_alert_collection.rb
aptible-rails-0.6.7 lib/aptible/rails/models/compliance_alert_collection.rb