ex_aequo_base 0.1.4 → 0.1.5
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/ex_aequo/base/kernel.rb +8 -9
- data/lib/ex_aequo/base/open_struct.rb +6 -0
- data/lib/ex_aequo/base/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24a260aad0b858a285db2f96eccff1885c3755e12eed40c61a01d4100ecc40ed
|
4
|
+
data.tar.gz: 961b6557e5002df0ee9993399de00f4705ecf55561b048e8ef9c5927c924030b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ba6c445f2dd6bfa21b20fd7e4bc5b83ce57ebc1b72c62049aad348f30ea36f32dc8e016bddf9cef180b29541ef900837124fb91a10b7e8364bb742e06dee4a1
|
7
|
+
data.tar.gz: d34123cb7cdf68a20195a4d95a408d30922ec129ab463d894360fecf76574f354bcb8f96c8c909882a09de50168a84696a164db7b8244f5e4d5b97c4899399f3
|
data/lib/ex_aequo/base/kernel.rb
CHANGED
@@ -3,14 +3,13 @@
|
|
3
3
|
require_relative 'constants'
|
4
4
|
module ExAequo::Base::KernelHelper extend self
|
5
5
|
|
6
|
-
def require_subdir(
|
7
|
-
|
8
|
-
raise ArgumentError, "must
|
9
|
-
|
10
|
-
if file
|
11
|
-
req_subdir_file(file, descend:)
|
12
|
-
else
|
6
|
+
def require_subdir(*files, descend:, &blk)
|
7
|
+
raise ArgumentError, "must not provide positional file parameter #{files} and a block" if !files.empty? && blk
|
8
|
+
raise ArgumentError, "must provide file or block" unless !files.empty? || blk
|
9
|
+
if files.empty?
|
13
10
|
req_subdir_blk(descend:, &blk)
|
11
|
+
else
|
12
|
+
req_subdir_file(File.join(files), descend:)
|
14
13
|
end
|
15
14
|
end
|
16
15
|
|
@@ -46,8 +45,8 @@ module ExAequo::Base::KernelHelper extend self
|
|
46
45
|
end
|
47
46
|
|
48
47
|
module Kernel
|
49
|
-
def require_subdir(
|
50
|
-
ExAequo::Base::KernelHelper.require_subdir(
|
48
|
+
def require_subdir(*files, descend: false, &blk)
|
49
|
+
ExAequo::Base::KernelHelper.require_subdir(*files, descend:, &blk)
|
51
50
|
end
|
52
51
|
end
|
53
52
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|