Class: RelaxDB::ViewResult

Inherits:
Array
  • Object
show all
Defined in:
lib/relaxdb/view_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result_hash) ⇒ ViewResult

Returns a new instance of ViewResult.



7
8
9
10
11
12
13
14
# File 'lib/relaxdb/view_result.rb', line 7

def initialize(result_hash)
  objs = RelaxDB.create_from_hash(result_hash)
  
  @offset = result_hash["offset"]
  @total_rows = result_hash["total_rows"]
  
  super(objs)
end

Instance Attribute Details

#offsetObject (readonly)

Returns the value of attribute offset.



5
6
7
# File 'lib/relaxdb/view_result.rb', line 5

def offset
  @offset
end

#total_rowsObject (readonly)

Returns the value of attribute total_rows.



5
6
7
# File 'lib/relaxdb/view_result.rb', line 5

def total_rows
  @total_rows
end