1
0
Fork 0
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:
Mike Dvorkin 2011-05-13 17:06:04 -07:00
parent 08730b1023
commit 17f6113aac
3 changed files with 13 additions and 14 deletions

View file

@ -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,

View file

@ -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)

View file

@ -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.