to_proc 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/to_proc/all.rb +1 -3
- data/lib/to_proc/{Array.rb → core/Array.rb} +0 -0
- data/lib/to_proc/core/Class.rb +1 -0
- data/lib/to_proc/core/Object.rb +1 -0
- data/lib/to_proc/link.rb +5 -0
- data/lib/to_proc/sugar.rb +4 -2
- data/lib/to_proc/try.rb +9 -7
- data/lib/to_proc.rb +6 -4
- data/to_proc.gemspec +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97dcc654333dbb220da9246cf7ad391126cb58ce
|
4
|
+
data.tar.gz: 93e039db6b1093ac7eb2af1ac7c69e2177271c58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1feb41290a03434644dfc1ddcd23e29426c4ecdb7be3d75142dd70cafdd29830f7ac9c727a5228d3f3f8c96d23a8ea932b5bb92ec58a9ecdccf8d92ba9f3ef39
|
7
|
+
data.tar.gz: 871e97599a8adbdf2041af5bd96ea04b24f637b0f7c8a92c47392f437b0095c5d9a4c1668f270eba16134e18e9dbad83b6cb576e5e3ce5fd60bd4981e75258c5
|
data/lib/to_proc/all.rb
CHANGED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Class.include ToProc[:new]
|
@@ -0,0 +1 @@
|
|
1
|
+
Object.include ToProc[:[]]
|
data/lib/to_proc/link.rb
ADDED
data/lib/to_proc/sugar.rb
CHANGED
data/lib/to_proc/try.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
|
2
|
-
->
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
module ToProc
|
2
|
+
Try = -> process do
|
3
|
+
-> input do
|
4
|
+
begin
|
5
|
+
output = process[input]
|
6
|
+
output.nil? ? input : output
|
7
|
+
rescue
|
8
|
+
input
|
9
|
+
end
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
data/lib/to_proc.rb
CHANGED
data/to_proc.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: to_proc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anatoly Chernow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -17,8 +17,11 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- lib/to_proc.rb
|
20
|
-
- lib/to_proc/Array.rb
|
21
20
|
- lib/to_proc/all.rb
|
21
|
+
- lib/to_proc/core/Array.rb
|
22
|
+
- lib/to_proc/core/Class.rb
|
23
|
+
- lib/to_proc/core/Object.rb
|
24
|
+
- lib/to_proc/link.rb
|
22
25
|
- lib/to_proc/sugar.rb
|
23
26
|
- lib/to_proc/try.rb
|
24
27
|
- to_proc.gemspec
|