Sha256: a4f8dee3dc0ba2977837c1ff3b381b82b8586afd421bc7341f381695ec9dd820
Contents?: true
Size: 623 Bytes
Versions: 28
Compression:
Stored size: 623 Bytes
Contents
=begin rdoc Binaries helper moduel =end module Printing # print_msg # Params # msg_array - Array of strings # Usage: # msg = ["hello", "world"] # print_msg(msg) def print_msg(msg_array) arr = msg_array.map {|line| Colors.process(line) } max_size = arr.sort {|a,b| a.size <=> b.size }.last.size arr.each do |line| puts line.ljust(max_size) end Colors.reset! end # Ask for response def are_you_sure?(msg) puts msg resp = STDIN.gets.chomp case resp when "Y" when "yes" when "y" return true else return false end end end
Version data entries
28 entries across 28 versions & 3 rubygems