Class: Clinical::Collection
- Inherits:
-
WillPaginate::Collection
- Object
- WillPaginate::Collection
- Clinical::Collection
- Includes:
- HappyMapper
- Defined in:
- lib/clinical/collection.rb
Defined Under Namespace
Classes: SearchResult
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
Class Method Summary collapse
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
4 5 6 |
# File 'lib/clinical/collection.rb', line 4 def count @count end |
Class Method Details
.create_from_results(page, per_page, body) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/clinical/collection.rb', line 6 def create_from_results(page, per_page, body) results = SearchResult.parse(body) col = create(page, per_page, results.count || 0) do |pager| pager.replace(results.trials) end col.count = results.count col end |