Class: Decidim::Exporters::ExportData

Inherits:
Object
  • Object
show all
Defined in:
lib/decidim/exporters/export_data.rb

Overview

Holds the result of an export.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, extension) ⇒ ExportData

Initializes an ‘ExportData` with the RAW data and the extension.



10
11
12
13
# File 'lib/decidim/exporters/export_data.rb', line 10

def initialize(data, extension)
  @data = data
  @extension = extension
end

Instance Attribute Details

#extensionObject (readonly)

Returns the value of attribute extension.



7
8
9
# File 'lib/decidim/exporters/export_data.rb', line 7

def extension
  @extension
end

Instance Method Details

#readObject

Gives back the raw data of the export.

Returns a String with the result of the export.



18
19
20
# File 'lib/decidim/exporters/export_data.rb', line 18

def read
  @data
end