Class: ACTV::SearchResults
Direct Known Subclasses
ArticleSearchResults, EventSearchResults, PopularInterestSearchResults
Instance Attribute Summary collapse
-
#items_per_page ⇒ Object
readonly
Returns the value of attribute items_per_page.
-
#start_index ⇒ Object
readonly
Returns the value of attribute start_index.
-
#total_results ⇒ Object
readonly
Returns the value of attribute total_results.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, from_response, #initialize, #memoize, #method_missing, object_attr_reader, #respond_to?, #to_hash, uri_attr_reader
Constructor Details
This class inherits a constructor from ACTV::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ACTV::Base
Instance Attribute Details
#items_per_page ⇒ Object (readonly)
Returns the value of attribute items_per_page.
7 8 9 |
# File 'lib/actv/search_results.rb', line 7 def items_per_page @items_per_page end |
#start_index ⇒ Object (readonly)
Returns the value of attribute start_index.
7 8 9 |
# File 'lib/actv/search_results.rb', line 7 def start_index @start_index end |
#total_results ⇒ Object (readonly)
Returns the value of attribute total_results.
7 8 9 |
# File 'lib/actv/search_results.rb', line 7 def total_results @total_results end |
Instance Method Details
#facet_values ⇒ Array<ACTV::FacetValue>
24 25 26 27 28 |
# File 'lib/actv/search_results.rb', line 24 def facet_values @facet_values ||= Array(@attrs[:facet_values]).map do |facet_value| ACTV::FacetValue.new(facet_value) end end |
#facets ⇒ Array<ACTV::Facet>
17 18 19 20 21 |
# File 'lib/actv/search_results.rb', line 17 def facets @facets ||= Array(@attrs[:facets]).map do |facet| ACTV::Facet.new(facet) end end |
#results ⇒ Array<ACTV::Asset>
10 11 12 13 14 |
# File 'lib/actv/search_results.rb', line 10 def results @results ||= Array(@attrs[:results]).map do |asset| ACTV::Asset.new(asset) end end |