Guest User

Untitled

a guest
Apr 24th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. def teaser(text, wordcount, omission)
  2. text.split[0..(wordcount-1)].join(" ") + (text.split.size > wordcount ? " " + omission : "")
  3. end
Add Comment
Please, Sign In to add comment