Class: Deepsearch::SearchAdapters::MockAdapter
- Inherits:
-
Object
- Object
- Deepsearch::SearchAdapters::MockAdapter
- Defined in:
- lib/search_adapters/mock_adapter.rb
Overview
A mock search adapter for testing purposes. It returns a static, predefined set of search results without making any external API calls. This is useful for testing the pipeline’s behavior in isolation from live search services.
Instance Method Summary collapse
-
#initialize(api_key = nil) ⇒ MockAdapter
constructor
A new instance of MockAdapter.
- #search(query, options = {}) ⇒ Object
Constructor Details
#initialize(api_key = nil) ⇒ MockAdapter
Returns a new instance of MockAdapter.
9 |
# File 'lib/search_adapters/mock_adapter.rb', line 9 def initialize(api_key = nil); end |
Instance Method Details
#search(query, options = {}) ⇒ Object
11 12 13 |
# File 'lib/search_adapters/mock_adapter.rb', line 11 def search(query, = {}) mock_results(query, ) end |