class FindT::CLI

Public Class Methods

new(args, root_path, isatty) click to toggle source
# File lib/find_t/cli.rb, line 9
def initialize(args, root_path, isatty)
  @root_path = root_path

  parse_options! args

  @scanner = Scanner.new(
    root_path: @root_path,
    rails:     @options['rails'],
  )
  @printer = Printer.new @root_path, isatty

  run
end

Private Instance Methods

parse_options!(args) click to toggle source
# File lib/find_t/cli.rb, line 23
        def parse_options!(args)
  @options = args.getopts '', 'rails'
  @name    = args[0]
end
run() click to toggle source
# File lib/find_t/cli.rb, line 28
        def run
  @printer.print_header
  founds = @scanner.scan @name
  @printer.print_results founds
end