module Franklin

Constants

Availability
Item
Library
VERSION

Public Class Methods

run(search_terms, config_path: nil, type: nil, out:) click to toggle source
# File lib/franklin.rb, line 8
def run(search_terms, config_path: nil, type: nil, out:)
  config = Config.load_from_file(config_path)
  results = ThreadedSearch.new(config.libraries).perform(search_terms)
  filtered_results = TypeFilter.new(type || config.default_type).perform(results)
  ConsoleReport.new(search_terms, filtered_results).print_to_out(out)
end

Private Instance Methods

run(search_terms, config_path: nil, type: nil, out:) click to toggle source
# File lib/franklin.rb, line 8
def run(search_terms, config_path: nil, type: nil, out:)
  config = Config.load_from_file(config_path)
  results = ThreadedSearch.new(config.libraries).perform(search_terms)
  filtered_results = TypeFilter.new(type || config.default_type).perform(results)
  ConsoleReport.new(search_terms, filtered_results).print_to_out(out)
end