Guest User

Untitled

a guest
Feb 19th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. # str = (0 .. 15).each_with_index.map do |item, index|
  2. # ("%04b" % item).tr("01", " #") +
  3. # (index % 4 == 3 ? "\n" : "|")
  4. # end.join
  5. # puts str
  6. # # outputs:
  7. # # | #| # | ##
  8. # # # | # #| ## | ###
  9. # # # |# #|# # |# ##
  10. # # ## |## #|### |####
Add Comment
Please, Sign In to add comment