Class: Protons8::ProtonCouch::CouchResponse::View

Inherits:
BaseResponse
  • Object
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::ProtonCouch::CouchResponse::BaseResponse

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


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

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

#empty?Boolean

Returns:

  • (Boolean)


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

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

#offsetObject



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

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

#rowsObject



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

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

#total_rowsObject



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

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