Class: SentimentInsights::Export::Result
- Inherits:
-
Hash
- Object
- Hash
- SentimentInsights::Export::Result
- Includes:
- Exportable
- Defined in:
- lib/sentiment_insights/export/exportable.rb
Overview
Result class that wraps analysis results with export functionality
Class Method Summary collapse
-
.wrap(analysis_result) ⇒ Object
Factory method to create Result from analysis output.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Result
constructor
A new instance of Result.
Methods included from Exportable
#export, #export_all, #export_by_segment, #export_negative, #export_positive, #exporter, #filter_segments, #filter_sentiment, #responses_only, #summary_only, #to_csv, #to_excel, #to_hash, #to_json, #to_json_string, #with_export_options, #with_segments, #without_segments
Constructor Details
#initialize(data = {}) ⇒ Result
Returns a new instance of Result.
141 142 143 144 |
# File 'lib/sentiment_insights/export/exportable.rb', line 141 def initialize(data = {}) super() merge!(data) end |
Class Method Details
.wrap(analysis_result) ⇒ Object
Factory method to create Result from analysis output
147 148 149 |
# File 'lib/sentiment_insights/export/exportable.rb', line 147 def self.wrap(analysis_result) new(analysis_result) end |