Class: CodeLister::Main

Inherits:
Object
  • Object
show all
Defined in:
lib/code_lister/main.rb

Class Method Summary collapse

Class Method Details

.run(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/code_lister/main.rb', line 4

def run(options = {})
  args = default_options.merge(options)
  files = CodeLister.files(args)
  inc_words = args.fetch(:inc_words, [])
  exc_words = args.fetch(:exc_words, [])
  files = CodeLister.filter(files, inc_words: inc_words,
                                   exc_words: exc_words)
  puts files
  files
end