lp 0.2.0 → 0.2.1
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 +8 -1
- data/lib/lp.rb +7 -1
- data/lib/lp/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: 425b70bdae7442581dbb4e8ba1b7044d9e7ef62c603b01468a73adae594e1491
|
4
|
+
data.tar.gz: 8b12729d6a5a2ed35440aaf08bdd06c948f516ca590026ecff3ec243b6d1d388
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0ccdbe740e2b9db3723018ba8b1dd2d26c9bb069c59304a8e99f6a18df83402d13accf12428465236762bbde62cd20f1db177ee94d00b2899c664c062d4b29f
|
7
|
+
data.tar.gz: 13f66700e4296d257c7e9ee412313e6f7a2e169f500a5bdffbb5376952d17ca2165d80b29254b4da28b9819dd60cf997a96acd0540cfc9339ea8a693757d5a52
|
data/README.md
CHANGED
@@ -18,10 +18,17 @@ lp your_object
|
|
18
18
|
Print a plain YAML output:
|
19
19
|
|
20
20
|
```ruby
|
21
|
-
lp your_object
|
21
|
+
lp! your_object
|
22
22
|
# same as: puts your_object.to_yaml
|
23
23
|
```
|
24
24
|
|
25
|
+
Show the object's methods and instance variables:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
lp? your_object
|
29
|
+
# similar to: puts (your_object.methods - Object.methods).to_yaml
|
30
|
+
```
|
31
|
+
|
25
32
|
---
|
26
33
|
|
27
34
|
Installation
|
data/lib/lp.rb
CHANGED
@@ -20,4 +20,10 @@ def lp(anything)
|
|
20
20
|
result.gsub! /([&*]\d+)/, red + '\1' + reset
|
21
21
|
|
22
22
|
puts result
|
23
|
-
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def lp?(anything)
|
26
|
+
methods = (anything.methods - Object.methods).sort
|
27
|
+
vars = anything.instance_variables.sort
|
28
|
+
lp methods: methods, instance_vars: vars
|
29
|
+
end
|
data/lib/lp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Lovely print
|
14
14
|
email: db@dannyben.com
|