mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Updated default options
This commit is contained in:
parent
08730b1023
commit
17f6113aac
3 changed files with 13 additions and 14 deletions
12
README.md
12
README.md
|
@ -20,12 +20,12 @@ objects and usage within Rails templates are supported via included mixins.
|
|||
|
||||
Default options:
|
||||
|
||||
:multiline => true, # Display in multiple lines.
|
||||
:plain => false, # Use colors.
|
||||
:indent => 4, # Indent using 4 spaces.
|
||||
:index => true, # Display array indices.
|
||||
:html => false, # Use ANSI color codes rather than HTML.
|
||||
:sorted_hash_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.
|
||||
:color => {
|
||||
:array => :white,
|
||||
:bignum => :blue,
|
||||
|
|
|
@ -31,8 +31,6 @@ module AwesomePrint
|
|||
CORE.grep(type)[0] || :self
|
||||
end
|
||||
|
||||
# Pick the color and apply it to the given string as necessary.
|
||||
#------------------------------------------------------------------------------
|
||||
# Pick the color and apply it to the given string as necessary.
|
||||
#------------------------------------------------------------------------------
|
||||
def colorize(s, type)
|
||||
|
|
|
@ -16,6 +16,12 @@ module AwesomePrint
|
|||
|
||||
def initialize(options = {})
|
||||
@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.
|
||||
:color => {
|
||||
:array => :white,
|
||||
:bigdecimal => :blue,
|
||||
|
@ -35,12 +41,7 @@ module AwesomePrint
|
|||
:args => :pale,
|
||||
:keyword => :cyan,
|
||||
:variable => :cyanish
|
||||
},
|
||||
:indent => 4,
|
||||
:index => true,
|
||||
:multiline => true,
|
||||
:plain => false,
|
||||
:sort_keys => false
|
||||
}
|
||||
}
|
||||
|
||||
# Merge custom defaults and let explicit options parameter override them.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue