Class: ImportExport::TopicExporter
- Inherits:
-
BaseExporter
- Object
- BaseExporter
- ImportExport::TopicExporter
- Defined in:
- lib/import_export/topic_exporter.rb
Constant Summary
Constants inherited from BaseExporter
BaseExporter::CATEGORY_ATTRS, BaseExporter::GROUP_ATTRS, BaseExporter::POST_ATTRS, BaseExporter::TOPIC_ATTRS, BaseExporter::USER_ATTRS
Instance Attribute Summary
Attributes inherited from BaseExporter
Instance Method Summary collapse
- #default_filename_prefix ⇒ Object
-
#initialize(topic_ids) ⇒ TopicExporter
constructor
A new instance of TopicExporter.
- #perform ⇒ Object
Methods inherited from BaseExporter
#categories, #export_categories, #export_categories!, #export_category_groups, #export_category_groups!, #export_group_users, #export_group_users!, #export_groups, #export_groups!, #export_topic_users, #export_topic_users!, #export_topics, #export_topics!, #export_translation_overrides, #export_users, #save_to_file
Constructor Details
#initialize(topic_ids) ⇒ TopicExporter
Returns a new instance of TopicExporter.
7 8 9 10 |
# File 'lib/import_export/topic_exporter.rb', line 7 def initialize(topic_ids) @topics = Topic.where(id: topic_ids).to_a @export_data = { topics: [], users: [] } end |
Instance Method Details
#default_filename_prefix ⇒ Object
20 21 22 |
# File 'lib/import_export/topic_exporter.rb', line 20 def default_filename_prefix "topic-export" end |
#perform ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/import_export/topic_exporter.rb', line 12 def perform export_topics! export_topic_users! # TODO: user actions self end |