Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifies usage in the readme. #356

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ap object, options = {}
Default options:

```ruby
indent: 4, # Number of spaces for indenting.
indent: 4, # Abs value is number of spaces for indenting. Negative makes it left aligned versus centered.
index: true, # Display array indices.
html: false, # Use ANSI color codes rather than HTML.
multiline: true, # Display in multiple lines.
Expand All @@ -42,7 +42,7 @@ raw: false, # Do not recursively format instance variables.
sort_keys: false, # Do not sort hash keys.
sort_vars: true, # Sort instance variables.
limit: false, # Limit arrays & hashes. Accepts bool or int.
ruby19_syntax: false, # Use Ruby 1.9 hash syntax in output.
ruby19_syntax: false, # Use Ruby>=1.9 hash syntax (trailing colon, no hash-rocket) in output.
class_name: :class, # Method called to report the instance class name. (e.g. :to_s)
object_id: true, # Show object id.
color: {
Expand Down Expand Up @@ -108,7 +108,7 @@ $ ruby 1.rb
$ cat > 2.rb
require "awesome_print"
data = { :now => Time.now, :class => Time.now.class, :distance => 42e42 }
ap data, :indent => -2 # <-- Left align hash keys.
ap data, :indent => -2 # <-- Left align hash keys, indenting 2 spaces.
^D
$ ruby 2.rb
{
Expand Down