1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00

Changed :limited to false by default and updated README.

This commit is contained in:
Andrew Horsman 2011-05-30 21:28:08 -04:00
parent 2dc13bb9af
commit b92cfe4347
2 changed files with 38 additions and 7 deletions

View file

@ -26,6 +26,8 @@ Default options:
:multiline => true, # Display in multiple lines. :multiline => true, # Display in multiple lines.
:plain => false, # Use colors. :plain => false, # Use colors.
:sort_keys => false, # Do not sort hash keys. :sort_keys => false, # Do not sort hash keys.
:limited => false, # Limit large output.
:limit_size => 7, # Total number of data lines in limited output.
:color => { :color => {
:array => :white, :array => :white,
:bignum => :blue, :bignum => :blue,
@ -137,6 +139,35 @@ Supported color names:
$ ruby 6.rb $ ruby 6.rb
42 42
true true
$ cat 7.rb
require "awesome_print"
some_array = (1..1000).to_a
ap some_array, :limited => true
^D
$ ruby 7.rb
[
[ 0] 1,
[ 1] 2,
[ 2] 3,
[ 3] .. [996],
[997] 998,
[998] 999,
[999] 1000
]
$ cat 8.rb
require "awesome_print"
some_array = (1..1000).to_a
ap some_array, :limit_size => 5
^D
$ ruby 8.rb
[
[ 0] 1,
[ 1] 2,
[ 2] .. [997],
[998] 999,
[999] 1000
]
### Example (Rails console) ### ### Example (Rails console) ###
$ rails console $ rails console

View file

@ -22,7 +22,7 @@ module AwesomePrint
:multiline => true, # Display in multiple lines. :multiline => true, # Display in multiple lines.
:plain => false, # Use colors. :plain => false, # Use colors.
:sort_keys => false, # Do not sort hash keys. :sort_keys => false, # Do not sort hash keys.
:limited => true, # Limit large output. :limited => false, # Limit large output.
:limit_size => 7, # Total number of data lines in limited output. :limit_size => 7, # Total number of data lines in limited output.
:color => { :color => {
:array => :white, :array => :white,