Method: CouchObject::Response#to_document

Defined in:
lib/couch_object/response.rb

#to_documentObject

Returns a CouchObject::Document with the parsed_body set as the attributes



30
31
32
33
34
35
36
# File 'lib/couch_object/response.rb', line 30

def to_document
  if @parsed_body
    Document.new(@parsed_body)
  else
    Document.new(parse.parsed_body)
  end
end