Class: RelaxDB::ViewResult
- Inherits:
-
Array
- Object
- Array
- RelaxDB::ViewResult
- Defined in:
- lib/relaxdb/view_result.rb
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#total_rows ⇒ Object
readonly
Returns the value of attribute total_rows.
Instance Method Summary collapse
-
#initialize(result_hash) ⇒ ViewResult
constructor
A new instance of ViewResult.
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
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
5 6 7 |
# File 'lib/relaxdb/view_result.rb', line 5 def offset @offset end |
#total_rows ⇒ Object (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 |