Class: ECFS::Proceeding::ResultSet
- Inherits:
-
Hash
- Object
- Hash
- ECFS::Proceeding::ResultSet
- Defined in:
- lib/ecfs/proceeding.rb
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ ResultSet
constructor
A new instance of ResultSet.
- #next ⇒ Object
- #next_query ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ ResultSet
Returns a new instance of ResultSet.
39 40 41 42 |
# File 'lib/ecfs/proceeding.rb', line 39 def initialize(params={}) params["next_page_number"] = (params["constraints"]["page_number"].to_i + 1).to_s merge!(params) end |
Instance Method Details
#next ⇒ Object
54 55 56 |
# File 'lib/ecfs/proceeding.rb', line 54 def next next_query.get end |
#next_query ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'lib/ecfs/proceeding.rb', line 44 def next_query query = ECFS::Proceeding.query self["constraints"].each_pair do |key, value| query.eq(key, value) unless key == "page_number" end query.constraints["page_number"] = self["next_page_number"] query end |