Class: CouchClient::Row

Inherits:
ConsistentHash show all
Defined in:
lib/couch-client/row.rb

Overview

Row is an extended Hash that provides additional state to get status codes and connect documents to the server.

Instance Method Summary collapse

Methods inherited from ConsistentHash

#[]=, #default, #delete, #dup, #fetch, #key?, #merge, #regular_update, #regular_writer, #to_hash, #update, #values_at

Constructor Details

#initialize(code, row, connection) ⇒ Row

Returns a new instance of Row.



5
6
7
8
# File 'lib/couch-client/row.rb', line 5

def initialize(code, row, connection)
  self.merge!(row)
  self["doc"] &&= Document.new(code, row["doc"], connection)
end