Class: Couchbase::Cluster::AnalyticsResult

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/analytics_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|self| ... } ⇒ AnalyticsResult

Returns a new instance of AnalyticsResult.

Yield Parameters:



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_dataAnalyticsMetaData

Returns:



91
92
93
# File 'lib/couchbase/analytics_options.rb', line 91

def 
  @meta_data
end

#transcoderObject

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

Returns:

  • (Array)


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