pp 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pp.rb +4 -4
- data/pp.gemspec +9 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05c96009c03ef3d1fb5542a17f2833a93b128a7579380a4c608384fc6232d5a7
|
4
|
+
data.tar.gz: 629c3161e24420959ea1946d612f22ce4b73694f7e5c805499fb166f75cd9de8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98484471668309f5a8822bc9206cff58534431274db6d0cb828876417fdf4f4e932f61894d613aced33246ee168b85c4d6c2d8d38faaf5bdb0fae6fcea55bc59
|
7
|
+
data.tar.gz: 4fd410d4b90723eaaf32e221d219ee88db428ecc7b133f0b873aa9625045bc7e83d55e04edeb0d715ed3d9a32d71cb2ae5d0aaad4ebf981f05424a4dfbfebb5c
|
data/lib/pp.rb
CHANGED
@@ -46,6 +46,7 @@ require 'prettyprint'
|
|
46
46
|
#
|
47
47
|
# To define a customized pretty printing function for your classes,
|
48
48
|
# redefine method <code>#pretty_print(pp)</code> in the class.
|
49
|
+
# Note that <code>require 'pp'</code> is needed before redefining <code>#pretty_print(pp)</code>.
|
49
50
|
#
|
50
51
|
# <code>#pretty_print</code> takes the +pp+ argument, which is an instance of the PP class.
|
51
52
|
# The method uses #text, #breakable, #nest, #group and #pp to print the
|
@@ -61,6 +62,9 @@ require 'prettyprint'
|
|
61
62
|
# Tanaka Akira <akr@fsij.org>
|
62
63
|
|
63
64
|
class PP < PrettyPrint
|
65
|
+
|
66
|
+
VERSION = "0.5.0"
|
67
|
+
|
64
68
|
# Returns the usable width for +out+.
|
65
69
|
# As the width of +out+:
|
66
70
|
# 1. If +out+ is assigned to a tty device, its width is used.
|
@@ -629,10 +633,6 @@ end
|
|
629
633
|
module Kernel
|
630
634
|
# Returns a pretty printed object as a string.
|
631
635
|
#
|
632
|
-
# In order to use this method you must first require the PP module:
|
633
|
-
#
|
634
|
-
# require 'pp'
|
635
|
-
#
|
636
636
|
# See the PP module for more information.
|
637
637
|
def pretty_inspect
|
638
638
|
PP.pp(self, ''.dup)
|
data/pp.gemspec
CHANGED
@@ -1,6 +1,13 @@
|
|
1
|
+
name = File.basename(__FILE__, ".gemspec")
|
2
|
+
version = ["lib", Array.new(name.count("-")+1).join("/")].find do |dir|
|
3
|
+
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
4
|
+
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
5
|
+
end rescue nil
|
6
|
+
end
|
7
|
+
|
1
8
|
Gem::Specification.new do |spec|
|
2
|
-
spec.name =
|
3
|
-
spec.version =
|
9
|
+
spec.name = name
|
10
|
+
spec.version = version
|
4
11
|
spec.authors = ["Tanaka Akira"]
|
5
12
|
spec.email = ["akr@fsij.org"]
|
6
13
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanaka Akira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prettyprint
|
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
58
|
requirements: []
|
59
|
-
rubygems_version: 3.
|
59
|
+
rubygems_version: 3.5.0.dev
|
60
60
|
signing_key:
|
61
61
|
specification_version: 4
|
62
62
|
summary: Provides a PrettyPrinter for Ruby objects
|