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:
parent
2dc13bb9af
commit
b92cfe4347
2 changed files with 38 additions and 7 deletions
43
README.md
43
README.md
|
@ -20,12 +20,14 @@ objects and usage within Rails templates are supported via included mixins.
|
||||||
|
|
||||||
Default options:
|
Default options:
|
||||||
|
|
||||||
:indent => 4, # Indent using 4 spaces.
|
:indent => 4, # Indent using 4 spaces.
|
||||||
:index => true, # Display array indices.
|
:index => true, # Display array indices.
|
||||||
:html => false, # Use ANSI color codes rather than HTML.
|
:html => false, # Use ANSI color codes rather than HTML.
|
||||||
: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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue