Class: Longleaf::ServiceCandidateLocator
- Inherits:
-
Object
- Object
- Longleaf::ServiceCandidateLocator
- Defined in:
- lib/longleaf/candidates/service_candidate_locator.rb
Overview
Service which locates files that have services which need to be performed on them.
Instance Method Summary collapse
-
#candidate_iterator(file_selector, event, force = false) ⇒ Object
Get a iterator of the candidates matching the given FileSelector which need services run.
-
#initialize(app_config) ⇒ ServiceCandidateLocator
constructor
A new instance of ServiceCandidateLocator.
Constructor Details
#initialize(app_config) ⇒ ServiceCandidateLocator
Returns a new instance of ServiceCandidateLocator
7 8 9 |
# File 'lib/longleaf/candidates/service_candidate_locator.rb', line 7 def initialize(app_config) @app_config = app_config end |
Instance Method Details
#candidate_iterator(file_selector, event, force = false) ⇒ Object
Get a iterator of the candidates matching the given FileSelector which need services run.
14 15 16 17 18 19 20 21 |
# File 'lib/longleaf/candidates/service_candidate_locator.rb', line 14 def candidate_iterator(file_selector, event, force = false) if @app_config.index_manager.using_index? ServiceCandidateIndexIterator.new(file_selector, event, @app_config, force) else # Get filesystem based implementation ServiceCandidateFilesystemIterator.new(file_selector, event, @app_config, force) end end |