Class: Jsearch::Searcher

Inherits:
Object
  • Object
show all
Defined in:
lib/jsearch/searcher.rb

Overview

Console printer

Instance Method Summary collapse

Constructor Details

#initialize(config, printer) ⇒ Searcher

Returns a new instance of Searcher.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/jsearch/searcher.rb', line 13

def initialize(config, printer)
  @config    = config
  @printer   = printer
  @class_ref = class_ref
  @class_doc = class_doc

  @printer.force find_package if @config.package

  @printer.force find_import  if @config.import

  methods if @config.methods
rescue StandardError => e
  @printer&.error e.message
end