ruby-rails-extensions 2.0.0.pre.rc.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55be0ba360ddc75f362e31c5e4dd863f6816b897e3fb722db748698a379e586f
|
4
|
+
data.tar.gz: 879cdcb54384e5927bacbad99714f54c2d737a86f55aac79d4f97d83de658b59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 868b8f77e7e7ec4d974ac7af0e0f07352362d009ff1ab748868965a072f4c7cafd1ea9ec44ec30a6828f19a7d59a9ec1b4bafd7272a25fde053f7d442809f6ca
|
7
|
+
data.tar.gz: 43d272c9b3bc33ccceef003fc3f4e8be1bb3dd6ec83dd6b42879186e7c52dab68c57b0cfa8b6fe5a5660e756a06c0b2110fab411bed6d1e239b5866c8a310a58
|
@@ -4,15 +4,15 @@ require 'forwardable'
|
|
4
4
|
require 'set'
|
5
5
|
|
6
6
|
Array.class_eval do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
# Replace my_array.map(&:method1).map(&:method2) with my_array.pipe(:method1, :method2)
|
8
|
+
# @return [Array]
|
9
|
+
def pipe(*fns)
|
10
|
+
map { |a| fns.reduce(a, &:send) }
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
Set.class_eval do
|
15
|
-
|
15
|
+
extend Forwardable
|
16
16
|
|
17
|
-
|
17
|
+
def_delegators :to_a, :pipe
|
18
18
|
end
|
@@ -1,16 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
TrueClass.class_eval do
|
4
|
-
|
4
|
+
alias_method :to_sort_i, :to_i
|
5
5
|
end
|
6
6
|
|
7
7
|
FalseClass.class_eval do
|
8
|
-
|
8
|
+
alias_method :to_sort_i, :to_i
|
9
9
|
end
|
10
10
|
|
11
11
|
NilClass.class_eval do
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
# :nodoc:
|
13
|
+
def to_sort_i
|
14
|
+
-1
|
15
15
|
end
|
16
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-rails-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brands Insurance
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop-rubomatic-rails
|
@@ -115,9 +115,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
115
|
version: 3.0.1
|
116
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
117
|
requirements:
|
118
|
-
- - "
|
118
|
+
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
120
|
+
version: '0'
|
121
121
|
requirements: []
|
122
122
|
rubygems_version: 3.2.15
|
123
123
|
signing_key:
|