Class: Couchbase::Cluster::AnalyticsResult
- Inherits:
-
Object
- Object
- Couchbase::Cluster::AnalyticsResult
- Defined in:
- lib/couchbase/analytics_options.rb
Instance Attribute Summary collapse
- #meta_data ⇒ AnalyticsMetaData
-
#transcoder ⇒ Object
Returns the value of attribute transcoder.
Instance Method Summary collapse
-
#initialize {|self| ... } ⇒ AnalyticsResult
constructor
A new instance of AnalyticsResult.
-
#rows(transcoder = self.transcoder) ⇒ Array
Returns all rows converted using a transcoder.
Constructor Details
#initialize {|self| ... } ⇒ AnalyticsResult
Returns a new instance of AnalyticsResult.
103 104 105 106 |
# File 'lib/couchbase/analytics_options.rb', line 103 def initialize @transcoder = JsonTranscoder.new yield self if block_given? end |
Instance Attribute Details
#meta_data ⇒ AnalyticsMetaData
91 92 93 |
# File 'lib/couchbase/analytics_options.rb', line 91 def @meta_data end |
#transcoder ⇒ Object
Returns the value of attribute transcoder.
93 94 95 |
# File 'lib/couchbase/analytics_options.rb', line 93 def transcoder @transcoder end |
Instance Method Details
#rows(transcoder = self.transcoder) ⇒ Array
Returns all rows converted using a transcoder
98 99 100 |
# File 'lib/couchbase/analytics_options.rb', line 98 def rows(transcoder = self.transcoder) @rows.lazy.map { |row| transcoder.decode(row, 0) } end |