class Eco::API::UseCases::DefaultCases::EntriesToCsv < Eco::API::Common::Loaders::UseCase name "entries-to-csv" type :import def main(entries, session, options, usecase) entries.export(filename) end private def filename options.dig(:export, :file) || "entries.csv" end end