w-stdlib 0.0.13 → 0.0.14
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 +4 -4
- data/lib/w-stdlib/core_ext/string.rb +18 -0
- data/w-stdlib.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3355c40d71a6abcf9d8d1f74872c23fa251444c5105f3798f6cbbe90497635ed
|
4
|
+
data.tar.gz: 17f0b9a70c22a681bfc6576e9f7b5789d9dd592bdc300803308c620595bb9740
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27a8fb9264d9cf7ff56d471107b2a45e9a3968fe5fe4188606ff6a2184fc5c9c32f62e5f52a323b5fe5c7433c23cccb69c23ffa146eedcf8d7d1a09a145d91ae
|
7
|
+
data.tar.gz: 13aa45d3fd2fc54f0a7a74a93ae191fb49f725efad56877c934143f81ca1a1d64e654318d2260169d8d8dff05a8f8d2bc0cd28da550f738ee82914eb234a1986
|
@@ -5,6 +5,24 @@ require 'yaml'
|
|
5
5
|
|
6
6
|
module StringExt
|
7
7
|
refine String do
|
8
|
+
def include_any?(ss)
|
9
|
+
ss.any? { include? _1 }
|
10
|
+
end
|
11
|
+
|
12
|
+
def include_all?(ss)
|
13
|
+
ss.all? { include? _1 }
|
14
|
+
end
|
15
|
+
|
16
|
+
def match_any?(pats)
|
17
|
+
pats.any? { match? _1 }
|
18
|
+
end
|
19
|
+
|
20
|
+
def match_all?(pats)
|
21
|
+
pats.all? { match? _1 }
|
22
|
+
end
|
23
|
+
|
24
|
+
def
|
25
|
+
|
8
26
|
def from_yaml
|
9
27
|
YAML.safe_load(self)
|
10
28
|
end
|
data/w-stdlib.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |g|
|
2
2
|
g.name = 'w-stdlib'
|
3
|
-
g.version = '0.0.
|
3
|
+
g.version = '0.0.14'
|
4
4
|
g.summary = 'Pre-alpha package that contains abstractions that I find useful when scripting. Not suitable for production use. Breaking changes highly likely even with minor version bumps. Use at your own risk'
|
5
5
|
g.description = g.summary
|
6
6
|
g.authors = ['will@btlr.dev']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: w-stdlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- will@btlr.dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|