eac_ruby_utils 0.118.1 → 0.119.1

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: 904ea7b7f6c0df2889d854f1f2aba29f52511bab46ab634cc6faf850fe2421f4
4
- data.tar.gz: 878c847fcdc7214bafc113c5a3af0269537c967858c6d399381f54ae997f0681
3
+ metadata.gz: b989d21e13492e1820c666ac1bf0bf356391fbe153be2e6c028bcba26e4facb7
4
+ data.tar.gz: 16f9c6c3d5cb8223e6e4bc6e810987d4176cdac63dc8e3b46f305a095e835987
5
5
  SHA512:
6
- metadata.gz: d7c3d1433a92489eb25ba845e0bc84b34a8065ececa9f27220a591176d4197a3ecf66de8f69dd27970fed3e3e5b24d9ae50679dcea3b19e0a104ef82d634e455
7
- data.tar.gz: 5ba94d00fe8576164dcc74caa66e54f13fdc5abf1bf9c9d8d7704a3727837a0dde5dac3c0e1ffa7fcf4ee37180faa41475e9a888dd235ec1fb23fdbdce9bf414
6
+ metadata.gz: 88e7a947e6d07320130f6480ede4f0dea7d576c2b2b64746ce609feddf730cbc101621396366b4a60a149611c37815d6dab507826c4e857000e8ae76f6e1ac03
7
+ data.tar.gz: e09f8f28d2f08f149b842388928bf7581482811793bde963084cacb71a88ca61adfd2731e7385161dcf243fbf2e8f6952244a4bc28d2499d17e2eb548df4bb67
@@ -3,7 +3,7 @@
3
3
  require 'eac_ruby_utils/patches/module/require_sub'
4
4
 
5
5
  module EacRubyUtils
6
- class ModuleAncestorsHash
6
+ class ModuleAncestorsVariable
7
7
  require_sub __FILE__
8
8
  end
9
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.118.1'
4
+ VERSION = '0.119.1'
5
5
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module EacRubyUtils
4
+ # The `Wildcards` class provides pattern matching with wildcards using regular expressions.
5
+ class Wildcards
6
+ # Initializes a new instance of the `Wildcards` class with the specified pattern.
7
+ #
8
+ # @param pattern [String] The pattern to match against.
9
+ def initialize(pattern)
10
+ @pattern = pattern
11
+ end
12
+
13
+ # Matches the given string against the pattern.
14
+ #
15
+ # @param string [String] The string to match.
16
+ # @return [Boolean] Returns `true` if the string matches the pattern, otherwise `false`.
17
+ delegate :match?, to: :regex
18
+
19
+ private
20
+
21
+ # @return [Regexp]
22
+ def regex
23
+ ::Regexp.new("^#{::Regexp.escape(@pattern).gsub('\*', '.*').gsub('\?', '.?')}$")
24
+ end
25
+ end
26
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_ruby_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.118.1
4
+ version: 0.119.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-24 00:00:00.000000000 Z
11
+ date: 2023-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -314,6 +314,7 @@ files:
314
314
  - lib/eac_ruby_utils/struct.rb
315
315
  - lib/eac_ruby_utils/unimplemented_method_error.rb
316
316
  - lib/eac_ruby_utils/version.rb
317
+ - lib/eac_ruby_utils/wildcards.rb
317
318
  - lib/eac_ruby_utils/yaml.rb
318
319
  homepage:
319
320
  licenses: