internetee-registry/app/models/inactive_contacts.rb
2020-09-02 17:41:20 +03:00

14 lines
249 B
Ruby

class InactiveContacts
attr_reader :contacts
def initialize(contacts = Contact.archivable)
@contacts = contacts
end
def archive
contacts.each do |contact|
contact.archive
yield contact if block_given?
end
end
end