class Pitle::CLI

Public Instance Methods

do() click to toggle source
# File lib/pitle.rb, line 69
def do()
  extensions = options[:extension].split(",")

  Dir.open(Dir.pwd){ |d|
    fileNameOperator = FileNameOperator.new(d.children, extensions)
    origin_filenames = fileNameOperator.pick_files()

    if options[:print0]
      print "./#{origin_filenames.join("\0./")}"
    else
      origin_filenames.each { |f| puts f }
    end
  }
end