string_proc 1.0.0 → 1.0.3
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 +5 -5
- data/lib/string_proc.rb +5 -1
- metadata +9 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c438fb3ed85ad080f84f08b8170866088df4ed7d612d2a878efcd2ef271bcaaf
|
4
|
+
data.tar.gz: d0e502e2013ad7ff9473f3e7d79b8300616abcacd0ae524325c16b4693ec10a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f22f68e25a56a4d24d96e8b0ddb93ea8d307fb163920da6cf206a4084ae5c9ac676bfa4a62a4a98c073a341a1c2fa98f8746523ac4964d9d7504e51f24ca1e5a
|
7
|
+
data.tar.gz: c3f1447490224a8ed91f368ad637ffb28f42281e4d70152ba8ad39ecc583a937c3d170f7b55aa6e9811838a89d3c32dbbac47a69a7ead5175323942c983739df
|
data/lib/string_proc.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class String
|
2
4
|
@@proc_separator ||= '.'
|
3
5
|
|
@@ -6,6 +8,8 @@ class String
|
|
6
8
|
end
|
7
9
|
|
8
10
|
def to_proc
|
9
|
-
proc
|
11
|
+
proc do |object|
|
12
|
+
split(@@proc_separator).inject(object) { |obj, method| obj.send(method) }
|
13
|
+
end
|
10
14
|
end
|
11
15
|
end
|
metadata
CHANGED
@@ -1,67 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_proc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Rosenberg
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
name: rspec
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.0'
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 2.0.0
|
23
|
-
type: :development
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '2.0'
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 2.0.0
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: simplecov
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '0.8'
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 0.8.0
|
43
|
-
type: :development
|
44
|
-
prerelease: false
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '0.8'
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 0.8.0
|
53
|
-
description: Adds the to_proc method to the string class.
|
11
|
+
date: 2020-09-08 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Adds `String#to_proc`.
|
54
14
|
email: aarongrosenberg@gmail.com
|
55
15
|
executables: []
|
56
16
|
extensions: []
|
57
17
|
extra_rdoc_files: []
|
58
18
|
files:
|
59
19
|
- lib/string_proc.rb
|
60
|
-
homepage: https://github.com/
|
20
|
+
homepage: https://github.com/agrberg/string_proc
|
61
21
|
licenses:
|
62
22
|
- MIT
|
63
23
|
metadata: {}
|
64
|
-
post_install_message:
|
24
|
+
post_install_message:
|
65
25
|
rdoc_options: []
|
66
26
|
require_paths:
|
67
27
|
- lib
|
@@ -76,9 +36,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
36
|
- !ruby/object:Gem::Version
|
77
37
|
version: '0'
|
78
38
|
requirements: []
|
79
|
-
|
80
|
-
|
81
|
-
signing_key:
|
39
|
+
rubygems_version: 3.1.2
|
40
|
+
signing_key:
|
82
41
|
specification_version: 4
|
83
42
|
summary: Turn a string into proc of a series of methods to be called on an object.
|
84
43
|
test_files: []
|