mirror of
https://github.com/awesome-print/awesome_print
synced 2023-03-27 23:22:34 -04:00
Release 0.1.1
This commit is contained in:
parent
29d041778e
commit
eb1cf1d0fe
4 changed files with 10 additions and 4 deletions
|
@ -59,6 +59,12 @@ objects are supported via included mixin.
|
|||
:distance => 4.2e+43
|
||||
}
|
||||
]
|
||||
irb> ap data[3], :indent => -2 # Left align hash keys.
|
||||
{
|
||||
:class => Time < Object,
|
||||
:now => Fri Apr 02 19:55:53 -0700 2010,
|
||||
:distance => 4.2e+43
|
||||
}
|
||||
irb> ap data, :multiline => false
|
||||
[ false, 42, [ "fourty", "two" ], { :class => Time < Object, :distance => 4.2e+43, :now => Fri Apr 02 19:44:52 -0700 2010 } ]
|
||||
irb>
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.1.0
|
||||
0.1.1
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = %q{awesome_print}
|
||||
s.version = "0.1.0"
|
||||
s.version = "0.1.1"
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Michael Dvorkin"]
|
||||
s.date = %q{2010-04-02}
|
||||
s.date = %q{2010-04-04}
|
||||
s.description = %q{Great Ruby dubugging companion: pretty print Ruby objects to visualize their structure. Supports Rails ActiveRecord objects via included mixin.}
|
||||
s.email = %q{mike@dvorkin.net}
|
||||
s.extra_rdoc_files = [
|
||||
|
|
|
@ -72,7 +72,7 @@ class AwesomePrint
|
|||
|
||||
data = data.inject([]) do |arr, (key, value)|
|
||||
if @options[:multiline]
|
||||
formatted_key = (@options[:indent] > 0 ? key.rjust(width) : indent + key.ljust(width))
|
||||
formatted_key = (@options[:indent] >= 0 ? key.rjust(width) : indent + key.ljust(width))
|
||||
else
|
||||
formatted_key = key
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue