闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
327 B

  1. # frozen_string_literal: true
  2. require 'csv'
  3. class Export
  4. attr_reader :accounts
  5. def initialize(accounts)
  6. @accounts = accounts
  7. end
  8. def to_csv
  9. CSV.generate do |csv|
  10. accounts.each do |account|
  11. csv << [(account.local? ? account.local_username_and_domain : account.acct)]
  12. end
  13. end
  14. end
  15. end