class Longleaf::ServiceCandidateLocator
Service which locates files that have services which need to be performed on them.
Public Class Methods
new(app_config)
click to toggle source
# File lib/longleaf/candidates/service_candidate_locator.rb, line 7 def initialize(app_config) @app_config = app_config end
Public Instance Methods
candidate_iterator(file_selector, event, force = false)
click to toggle source
Get a iterator of the candidates matching the given FileSelector
which need services run. @param file_selector [FileSelector] selector identifying the files to pull candidates from. @return an iterator
# 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