Sha256: 98fe3c0731e2dde4cd9bbff7aa61b397f1f85e7556450016ee87a42fd3624a3f

Contents?: true

Size: 524 Bytes

Versions: 2

Compression:

Stored size: 524 Bytes

Contents

require "ChunkyText/version"
require "ChunkyText/chunker" 




#
#  get the first 140 characters
#  find the location of the last punctuation mark
#  save all characters from that puncuation mark to the beging of the string to a variable
#  save that variable to the end of a "chunks" array
#  remove the characters from the input string
#  repeat the process untill the input string is empty
#  return the "chunks" array
#  
#  if any neighboring elements in the array add up to 140 chars or less, then merge them together

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ChunkyText-0.0.2 lib/ChunkyText.rb
ChunkyText-0.0.1 lib/ChunkyText.rb