refinements 12.7.0 → 12.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +5 -5
- data/lib/refinements/symbol.rb +2 -2
- data/refinements.gemspec +1 -1
- data.tar.gz.sig +2 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81242c43b3aad6b04319273228ac9a83e1dde30677f95bafe56629552e9a2aff
|
4
|
+
data.tar.gz: 350fbedab3dba89b6506b73b1ee1eb029d0fab302d347caddccfb53af865bc8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b52ff2d707ddca982386b1f65d49f21a080faa3f5985adead49c3c15c3bed2ebc4c5587c0bedbbe2fcc3a0b80e97946c5b895fb365d39eeeabf02922b0388a0
|
7
|
+
data.tar.gz: f7eaf17a912a7ddfdf05117da9a13f0bd699aae9238f6df8e8dcc26f963f431781710a20f39775162547c44fe847d04edd6304da3bbaea90412e74db35f2c72f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -1681,19 +1681,19 @@ An alias of `#merge` and identical in behavior (see `#merge` documentation for d
|
|
1681
1681
|
|
1682
1682
|
===== #call
|
1683
1683
|
|
1684
|
-
Enhances symbol-to-proc by allowing you to send
|
1685
|
-
with public methods in order to not break encapsulation.
|
1684
|
+
Enhances symbol-to-proc functionality by allowing you to send positional, keyword, and/or a block arguments. This only works with public methods in order to not break encapsulation.
|
1686
1685
|
|
1687
1686
|
[source,ruby]
|
1688
1687
|
----
|
1688
|
+
|
1689
1689
|
%w[clue crow cow].map(&:tr.call("c", "b")) # ["blue", "brow", "bow"]
|
1690
|
+
[1.3, 1.5, 1.9].map(&:round.call(half: :up)) # [1, 2, 2]
|
1690
1691
|
[%w[a b c], %w[c a b]].map(&:index.call { |element| element == "b" }) # [1, 2]
|
1691
|
-
%w[1.
|
1692
|
+
%w[1.out 2.in].map(&:sub.call(/\./) { |bullet| bullet + " " }) # ["1. out", "2. in"]
|
1692
1693
|
[1, 2, 3].map(&:to_s.call) # ["1", "2", "3"]
|
1693
1694
|
----
|
1694
1695
|
|
1695
|
-
⚠️ Use of `#call` without any arguments
|
1696
|
-
processing costs since the original symbol-to-proc call can be used instead.
|
1696
|
+
⚠️ Use of `#call` without any arguments should be avoided in order to not incur extra processing costs since the original symbol-to-proc call can be used instead.
|
1697
1697
|
|
1698
1698
|
== Development
|
1699
1699
|
|
data/lib/refinements/symbol.rb
CHANGED
@@ -4,8 +4,8 @@ module Refinements
|
|
4
4
|
# Provides additional enhancements to the Symbol primitive.
|
5
5
|
module Symbol
|
6
6
|
refine ::Symbol do
|
7
|
-
def call(*
|
8
|
-
proc { |receiver| receiver.public_send self, *
|
7
|
+
def call(*positionals, **keywords, &block)
|
8
|
+
proc { |receiver| receiver.public_send self, *positionals, **keywords, &block }
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
data/refinements.gemspec
CHANGED
data.tar.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
�����Ԯ荨��I4 "�uO�/�6#�h9�e:�e /(#Sg�]^Y1H�'�}�/��x�R#��H]�F�]w�j���k�tt�[�P�����P�uG�7U��1M�z?��(D��6����瀅2F(-:"6)-0֫+]��ri����MOKYm9��A��e�؈J�њ��/i����9<C�G�F:d\�)��
|
2
|
+
O�:6j����m}ǎq�t�bn^X<�$n�e�M����+I
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.7.
|
4
|
+
version: 12.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-
|
38
|
+
date: 2024-08-03 00:00:00.000000000 Z
|
39
39
|
dependencies: []
|
40
40
|
description:
|
41
41
|
email:
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.5.
|
96
|
+
rubygems_version: 3.5.17
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: A collection of core object refinements.
|
metadata.gz.sig
CHANGED
Binary file
|