method
pretty_print
v1_9_3_125 -
Show latest stable
- Class:
Array
pretty_print(q)public
No documentation available.
# File lib/pp.rb, line 336
def pretty_print(q)
q.group(1, '[', ']') {
q.seplist(self) {|v|
q.pp v
}
}
end 1Note
Feature
A default pretty printing method for general objects. It calls pretty_print_instance_variables to list instance variables.
If self has a customized (redefined) inspect method, the result of self.inspect is used but it obviously has no line break hints.
This module provides predefined pretty_print methods for some of the most commonly used built-in classes for convenience.