procify 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/procify/proc_method_factory.rb +5 -5
- data/lib/procify/version.rb +1 -1
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ac50e781dde1e0dfa6df134e89a17a6ab2b1658bb7c9e2ee343dfcc66d2c0e4
|
4
|
+
data.tar.gz: 81c5474b48bfb4a4f02316060254ca94bc89a5ce0e95f8ee50d7192ce5ef8e67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ff22a8a4296b05202e628933f0f5dc57301a0226102cee226d9051547dfcbefcf131dbeb3f226ae13ebf8c57feba949846955f530468948c939e0f518304bdc
|
7
|
+
data.tar.gz: 0fca5c5281e7fe98bcaef5dd07f2621857e7698e7099bf3d33500c4bc031a44bba98be60eb74a0fa7c367e7e1fe30458907e2a924a5d20ecdbaa76fc30a6af42
|
@@ -3,16 +3,16 @@ class ProcMethodFactory
|
|
3
3
|
@source = source
|
4
4
|
end
|
5
5
|
|
6
|
-
def method_missing name, *
|
6
|
+
def method_missing name, *stored_arguments, **stored_named_arguments
|
7
7
|
source = @source
|
8
|
-
proc do |*
|
8
|
+
proc do |*arguments, **named_arguments, &b|
|
9
9
|
method = source.method name
|
10
10
|
arity = method.arity
|
11
|
-
|
11
|
+
arg = [*stored_arguments, *arguments]
|
12
12
|
if arity >= 0
|
13
|
-
source.send(name, *
|
13
|
+
source.send(name, *arg[...arity], **stored_named_arguments, **named_arguments, &b)
|
14
14
|
else
|
15
|
-
source.send(name, *
|
15
|
+
source.send(name, *arg, **stored_named_arguments, **named_arguments, &b)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
data/lib/procify/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: procify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Łukasz Pomietło
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: 'Handy dsl for wrapping methods in procs.
|
14
|
+
|
15
|
+
'
|
14
16
|
email: oficjalnyadreslukasza@gmail.com
|
15
17
|
executables: []
|
16
18
|
extensions: []
|
@@ -23,7 +25,8 @@ homepage: https://github.com/lpogic/procify
|
|
23
25
|
licenses:
|
24
26
|
- Zlib
|
25
27
|
metadata:
|
26
|
-
documentation_uri: https://github.com/lpogic/procify/blob/
|
28
|
+
documentation_uri: https://github.com/lpogic/procify/blob/main/doc/wiki/README.md
|
29
|
+
homepage_uri: https://github.com/lpogic/procify
|
27
30
|
post_install_message:
|
28
31
|
rdoc_options: []
|
29
32
|
require_paths:
|
@@ -32,7 +35,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
32
35
|
requirements:
|
33
36
|
- - ">="
|
34
37
|
- !ruby/object:Gem::Version
|
35
|
-
version: 3.
|
38
|
+
version: 3.0.6
|
36
39
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
41
|
- - ">="
|