Class: Arpa::Services::Resources::Remove::ResourceRemover
- Inherits:
-
Object
- Object
- Arpa::Services::Resources::Remove::ResourceRemover
- Defined in:
- lib/arpa/services/resources/remove/resource_remover.rb
Instance Method Summary collapse
Instance Method Details
#remove_nonexistent_resources(resourceables) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/arpa/services/resources/remove/resource_remover.rb', line 6 def remove_nonexistent_resources(resourceables) resourceables_names = resourceables.map(&:to_s) finder_repo.all.each do |resource| exist = resourceables_names.include?(resource.full_name) remover_repo.destroy(resource) unless exist end end |