Class: Protons8::Couch::CouchResponse::View

Inherits:
BaseResponse show all
Defined in:
lib/protoncouch.rb

Overview

End of Get

Instance Method Summary collapse

Methods inherited from BaseResponse

#attachment, #attachments, #conflict?, #error?, #error_name, #initialize, #no_error?, #not_found?, #raw, #reason, #unauth?

Constructor Details

This class inherits a constructor from Protons8::Couch::CouchResponse::BaseResponse

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


169
170
171
# File 'lib/protoncouch.rb', line 169

def any?
  @hash['rows'] ? (not @hash['rows'][0].nil?) : false
end

#empty?Boolean

Returns:

  • (Boolean)


173
174
175
# File 'lib/protoncouch.rb', line 173

def empty?
  @hash['rows'] ? @hash['rows'].empty? : false
end

#offsetObject



161
162
163
# File 'lib/protoncouch.rb', line 161

def offset
  @hash['offset'] || nil
end

#rowsObject



165
166
167
# File 'lib/protoncouch.rb', line 165

def rows
  @hash['rows'] || nil
end

#total_rowsObject



157
158
159
# File 'lib/protoncouch.rb', line 157

def total_rows
  @hash['total_rows'] || nil
end