Module: Flapjack::Gateways::JSONAPI::EntityMethods::Helpers

Defined in:
lib/flapjack/gateways/jsonapi/entity_methods.rb

Instance Method Summary collapse

Instance Method Details

#checks_for_entity_ids(entity_ids) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/flapjack/gateways/jsonapi/entity_methods.rb', line 18

def checks_for_entity_ids(entity_ids)
  return if entity_ids.nil?
  entity_ids.inject([]) do |memo, entity_id|
    entity = find_entity_by_id(entity_id)
    check_names = entity.check_list.sort
    check_names.each do |check_name|
      memo << find_entity_check(entity, check_name)
    end
    memo
  end
end