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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f42430967e4c2f9e06b956df55783e74a92a1e820d226b580517f21f50c00e2
4
- data.tar.gz: fb27b96a0dcabf3730527c162013114a465c00ac4a369595c25ac17fc9d032ad
3
+ metadata.gz: 24a260aad0b858a285db2f96eccff1885c3755e12eed40c61a01d4100ecc40ed
4
+ data.tar.gz: 961b6557e5002df0ee9993399de00f4705ecf55561b048e8ef9c5927c924030b
5
5
  SHA512:
6
- metadata.gz: 84104dce64e79d0fe8945d1aeaac2f63bbb14329933eb4e9f84aefbfae68f2b842c9c0de5c82dca1c1c1cfddc3d2060dd532f7d03001efeffe5d3625b15b8a23
7
- data.tar.gz: ce17b03ae58f71e3b0d9c2c45d9c7e55a32b1ad7788f1c31163f4fd263879c340a1a6558495026060caf950dcf0a394eb43ccef3b1112f1164165e8b3a241343
6
+ metadata.gz: 7ba6c445f2dd6bfa21b20fd7e4bc5b83ce57ebc1b72c62049aad348f30ea36f32dc8e016bddf9cef180b29541ef900837124fb91a10b7e8364bb742e06dee4a1
7
+ data.tar.gz: d34123cb7cdf68a20195a4d95a408d30922ec129ab463d894360fecf76574f354bcb8f96c8c909882a09de50168a84696a164db7b8244f5e4d5b97c4899399f3
@@ -3,14 +3,13 @@
3
3
  require_relative 'constants'
4
4
  module ExAequo::Base::KernelHelper extend self
5
5
 
6
- def require_subdir(file, descend:, &blk)
7
-
8
- raise ArgumentError, "must not provide positional file parameter #{file.inspect} and a block" if file && blk
9
- raise ArgumentError, "must provide file or block" unless file || blk
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(file=nil, descend: false, &blk)
50
- ExAequo::Base::KernelHelper.require_subdir(file, descend:, &blk)
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
@@ -6,6 +6,12 @@ class OpenStruct
6
6
  extend Forwarder
7
7
  forward_all :deconstruct_keys, :empty?, :fetch, :has_key?, to: :to_h
8
8
 
9
+ def self.to_proc
10
+ -> hashy do
11
+ new hashy
12
+ end
13
+ end
14
+
9
15
  def update(hashy)
10
16
  hashy.to_h.each do |k, v|
11
17
  self[k] = v
@@ -2,7 +2,7 @@
2
2
 
3
3
  module ExAequo
4
4
  module Base
5
- VERSION = '0.1.4'
5
+ VERSION = '0.1.5'
6
6
  end
7
7
  end
8
8
  # SPDX-License-Identifier: AGPL-3.0-or-later
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ex_aequo_base
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Dober