lines = File.readlines("text.txt")line_count = lines.sizetext = lines.joinputs "#{line_count} lines"sentence_count = text.split(/\.|\?|!/).lengthputs "#{sentence_count} sentences"