Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/rake/extensions.rb

Instance Method Summary collapse

Instance Method Details

#prettyPrint(result, prefix) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rake/extensions.rb', line 29

def prettyPrint(result, prefix)
  if empty? then
    result.puts(prefix+'=emptyArray');
  else
    index = 0;
    each do | aValue |
      if aValue.respond_to?(:prettyPrint) then
        aValue.prettyPrint(result, prefix+'['+index.to_s+']');
      else
        result.puts(prefix+'['+index.to_s+']='+aValue.to_s);
      end
      index += 1;
    end
  end
end