Class: Ecfr::SearchService::DateFacet
- Extended by:
- ResponseHelper
- Includes:
- FacetAttributeMethodDefinition
- Defined in:
- lib/ecfr/search_service/date_facet.rb,
lib/ecfr/testing/extensions/search_service/date_facet_extensions.rb
Constant Summary
Constants inherited from FacetBase
FacetBase::COUNTS_PATH, FacetBase::VALID_SEARCH_OPTIONS
Constants inherited from Base
Base::SUPPORTED_ARRAY_ACCESSORS
Instance Attribute Summary collapse
- #count ⇒ String readonly
- #date ⇒ Date readonly
Attributes inherited from Base
#metadata, #request_data, #response_status, #results
Class Method Summary collapse
Methods included from ResponseHelper
Methods included from FacetAttributeMethodDefinition
#count_for, included, #initialize
Methods inherited from Base
base_url, service_name, service_path
Methods inherited from Base
basic_auth_client_options, #each, #initialize, metadata, metadata_key, result_key
Methods included from Extensible
Methods included from AttributeMethodDefinition
Methods inherited from Client
build, cache_key, client, client_pool, delete, execute, get, handle_response, perform, post, purge
Methods included from ParallelClient
Instance Attribute Details
#count ⇒ String (readonly)
8 |
# File 'lib/ecfr/search_service/date_facet.rb', line 8 attribute :count, as: :value |
#date ⇒ Date (readonly)
9 |
# File 'lib/ecfr/search_service/date_facet.rb', line 9 attribute :date, type: :date, as: :key |
Class Method Details
.response_for(date_facets) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/ecfr/testing/extensions/search_service/date_facet_extensions.rb', line 4 def self.response_for(date_facets) results = { dates: date_facets }.to_json build( response: stubbed_response(results) ) end |
.search(type, options = {}) ⇒ <DateFacet>
Returns counts by date.
13 14 15 16 |
# File 'lib/ecfr/search_service/date_facet.rb', line 13 def self.search(type, = {}) # no-op documentation only super(type, ) end |