diff --git a/README.md b/README.md index 27c840b..dcce1a3 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,14 @@ objects and usage within Rails templates are supported via included mixins. Default options: - :indent => 4, # Indent using 4 spaces. - :index => true, # Display array indices. - :html => false, # Use ANSI color codes rather than HTML. - :multiline => true, # Display in multiple lines. - :plain => false, # Use colors. - :sort_keys => false, # Do not sort hash keys. + :indent => 4, # Indent using 4 spaces. + :index => true, # Display array indices. + :html => false, # Use ANSI color codes rather than HTML. + :multiline => true, # Display in multiple lines. + :plain => false, # Use colors. + :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 => { :array => :white, :bignum => :blue, @@ -137,6 +139,35 @@ Supported color names: $ ruby 6.rb 42 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) ### $ rails console diff --git a/lib/awesome_print/inspector.rb b/lib/awesome_print/inspector.rb index 1422803..1f136e2 100755 --- a/lib/awesome_print/inspector.rb +++ b/lib/awesome_print/inspector.rb @@ -22,7 +22,7 @@ module AwesomePrint :multiline => true, # Display in multiple lines. :plain => false, # Use colors. :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. :color => { :array => :white,