Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/cli/cli_debug.rb

Overview

Some monkey patching for debugging.

Instance Method Summary collapse

Instance Method Details

#show_weights(msg = "") ⇒ Object

A debugging routine. Turned on by the –debug option.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/cli/cli_debug.rb', line 7

def show_weights(msg = "")
  if $game_debug
    print msg.ljust(7)
    self.each do |weight|
      print " #{Utl.channel_to_name(weight[1])}#{"%5.2f" % weight[0]} "
    end

    puts
  end

  self
end