def parse
      opts = OptionParser.new(&method(:options))
      opts.parse!(@args)
      return opts.help if @args.last.nil?

      file_preview = Filepreviews.generate(@args.last)
      @metadata ? file_preview.metadata(js: true) : file_preview
    end
def parse
      opts = OptionParser.new(&method(:options))
      opts.parse!(@args)
      return opts.help if @args.last.nil?

      file_preview = Filepreviews.generate(@args.last)
      @metadata ? file_preview.metadata(js: true) : file_preview
    end
Parses options sent from command-line