Guest User

Untitled

a guest
Jul 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. if body.respond_to? :to_str
  2. write body.to_str
  3. elsif body.respond_to?(:each)
  4. body.each { |part|
  5. write part.to_s
  6. }
  7. else
  8. raise TypeError, "stringable or iterable required"
  9. end
Add Comment
Please, Sign In to add comment