Class: Rforward::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/rforward.rb

Instance Method Summary collapse

Instance Method Details

#create_configObject



31
32
33
34
35
# File 'lib/rforward.rb', line 31

def create_config
  Config.instance.create_sample_config config_path
rescue ConfigNotFoundEx => e
  RLogger.instance.error e.message
end

#process_logs(path, ext = ".log") ⇒ Object



19
20
21
22
23
24
25
26
27
28
# File 'lib/rforward.rb', line 19

def process_logs path, ext=".log"
  check_config
  dependencies
  DirectoryProcessor.call path, ext
  RLogger.instance.info "#{path} logs extensions #{ext}"
  puts "Work finidhed press any key"
  STDIN.gets
rescue ConfigNotFoundEx => e
  RLogger.instance.error e.message
end