diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-09-05 22:19:48 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-02-21 16:45:01 +0000 |
commit | 6e704311bbb7c499f191d9b7d29dac0e37feabde () | |
tree | 61dfaf7b53a44cdfed2e12ad876fbd36cb934d3e /lib/pp.rb | |
parent | 37b8fc7477b1cbeb4f3a21ad4b22971170709cfa (diff) |
[ruby/pp] Extract pp_hash_pair
The method which prints single pair of a hash, to make extending pretty printing Hash easier, apart from Hash construct itself. https://.com/ruby/pp/commit/3fcf2d1142
-rw-r--r-- | lib/pp.rb | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -286,16 +286,21 @@ class PP < PrettyPrint group(1, '{', '}') { seplist(obj, nil, :each_pair) {|k, v| group { - pp k - text '=>' - group(1) { - breakable '' - pp v - } } } } end end include PPMethods |