ricecream 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/lib/ricecream/analyzer.rb +1 -1
- data/lib/ricecream/refine.rb +8 -1
- data/lib/ricecream/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5acee3b44937ed5be5788071563a4549958761667fc647cae7831b4683739a15
|
4
|
+
data.tar.gz: 4342369d05593a808844f35406baab827936daac1886863ac92ddecc23fd7688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c27cbac678e8671b1debc89c040eab2bdd912f4c1f2d388d424b04981c02dbda17ee6b8b07371a4d66d7060aaa902290c787e09a0a802e2987ad148c570e8fd
|
7
|
+
data.tar.gz: 8138178d34cc00344f704ad4b2bed0ebe6738a15ae5085eb25afe86a3be5110b89b3a704a9badfa91a7ea5793b5be83780b40ab7f58fb4373dc313782c2d1493
|
data/README.md
CHANGED
@@ -129,6 +129,16 @@ using Ricecream
|
|
129
129
|
ic
|
130
130
|
```
|
131
131
|
|
132
|
+
Similarly, you can override `p` by `using Ricecream::P`.
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
require "ricecream/refine"
|
136
|
+
|
137
|
+
using Ricecream::P
|
138
|
+
foo = 123
|
139
|
+
p foo # => ic| foo: 123
|
140
|
+
```
|
141
|
+
|
132
142
|
### Miscellaneous
|
133
143
|
|
134
144
|
- `ic_format(*args)` is like `ic` but the output is returned as a string instead of written to stderr.
|
data/lib/ricecream/analyzer.rb
CHANGED
data/lib/ricecream/refine.rb
CHANGED
@@ -12,7 +12,14 @@ module Ricecream
|
|
12
12
|
def ic_format(*args)
|
13
13
|
Ricecream.format(caller_locations(1, 1).first, :ic_format, args)
|
14
14
|
end
|
15
|
+
end
|
15
16
|
|
16
|
-
|
17
|
+
module P
|
18
|
+
refine Kernel do
|
19
|
+
def p(*args)
|
20
|
+
Ricecream.ic(caller_locations(1, 1).first, :p, args)
|
21
|
+
return *args
|
22
|
+
end
|
23
|
+
end
|
17
24
|
end
|
18
25
|
end
|
data/lib/ricecream/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ricecream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nodai2hITC
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Never use puts/p to debug again! More useful debugging libraries than
|
14
14
|
puts / p. (A Ruby port of Python's IceCream.)
|