Class: SentimentInsights::Export::BaseExporter

Inherits:
Object
  • Object
show all
Defined in:
lib/sentiment_insights/export/base_exporter.rb

Direct Known Subclasses

CsvExporter, ExcelExporter, JsonExporter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result, options = {}) ⇒ BaseExporter

Returns a new instance of BaseExporter.



9
10
11
12
13
# File 'lib/sentiment_insights/export/base_exporter.rb', line 9

def initialize(result, options = {})
  @result = result
  @options = default_options.merge(options)
  @analysis_type = detect_analysis_type(result)
end

Instance Attribute Details

#analysis_typeObject (readonly)

Returns the value of attribute analysis_type.



7
8
9
# File 'lib/sentiment_insights/export/base_exporter.rb', line 7

def analysis_type
  @analysis_type
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/sentiment_insights/export/base_exporter.rb', line 7

def options
  @options
end

#resultObject (readonly)

Returns the value of attribute result.



7
8
9
# File 'lib/sentiment_insights/export/base_exporter.rb', line 7

def result
  @result
end