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

Version Path
auser-poolparty-1.3.0 lib/mixins/printing.rb
auser-poolparty-1.3.1 lib/mixins/printing.rb
auser-poolparty-1.3.10 lib/mixins/printing.rb
auser-poolparty-1.3.11 lib/mixins/printing.rb
auser-poolparty-1.3.12 lib/mixins/printing.rb
auser-poolparty-1.3.13 lib/mixins/printing.rb
auser-poolparty-1.3.14 lib/mixins/printing.rb
auser-poolparty-1.3.15 lib/mixins/printing.rb
auser-poolparty-1.3.16 lib/mixins/printing.rb
auser-poolparty-1.3.17 lib/mixins/printing.rb
auser-poolparty-1.3.2 lib/mixins/printing.rb
auser-poolparty-1.3.3 lib/mixins/printing.rb
auser-poolparty-1.3.4 lib/mixins/printing.rb
auser-poolparty-1.3.5 lib/mixins/printing.rb
auser-poolparty-1.3.6 lib/mixins/printing.rb
auser-poolparty-1.3.7 lib/mixins/printing.rb
auser-poolparty-1.3.8 lib/mixins/printing.rb
fairchild-poolparty-1.3.17 lib/mixins/printing.rb
fairchild-poolparty-1.3.5 lib/mixins/printing.rb
poolparty-1.3.15 lib/mixins/printing.rb