rggen-core 0.30.0 → 0.31.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: 977e436971681e3425cdb967c6a86d7debeb89fac6ab33db6e7ab1d831102b8f
4
- data.tar.gz: 9d49db2290dfdc7b5c7dfc4a0369a2428ed9606f6487cad4c956c7144d46319f
3
+ metadata.gz: '0969d51d5ab39e5bf98ff6d7cb44ae8b9b4a7a9efea6d2c0eb47a8cd9685b4c2'
4
+ data.tar.gz: f5e71796fd8de70124491d20b3501680968edf8f12c15f3fc6e729791f7bdfd0
5
5
  SHA512:
6
- metadata.gz: 999522157b4878363182b31f22a3a12c73c6908409b043c972df3885e9908df66b7093b27bfbe90da30b5dfcebffdcbcdc2ccb1b11da87ebed244f071c991134
7
- data.tar.gz: 61149e6066502b04f73f525304745b7e555355c141944fb3e03a1043a6ab6761cd0637ffa90ca22c7d3e330d65020831031f525fa4a189b54c9834b78eccc551
6
+ metadata.gz: 9c27bfff2f272e80ca16331a3071560962e80051e0c4e566ae277bff99a5097cd32ccc87519f4c37a466bacd826da60c882b3e032492439d7c282437fc4d4aeb
7
+ data.tar.gz: b8b2365ac6de6ec997dbb3054d91a46e5c761218460ec416dcaf126e35549f38643f94d446c3b865bdc9e0346a4d7e7ead38e0665e9b09510ef7d6083013cbd5
@@ -6,7 +6,7 @@ module RgGen
6
6
  class ComponentFactory < InputBase::ComponentFactory
7
7
  private
8
8
 
9
- def create_input_data(&block)
9
+ def create_input_data(*_args, &block)
10
10
  InputData.new(valid_value_lists, &block)
11
11
  end
12
12
  end
@@ -24,14 +24,15 @@ module RgGen
24
24
 
25
25
  def preprocess(args)
26
26
  if root_factory?
27
- [*args[0..-2], load_files(args.last)]
27
+ [*args[0..-2], load_files(args)]
28
28
  else
29
29
  args
30
30
  end
31
31
  end
32
32
 
33
- def load_files(files)
34
- create_input_data do |input_data|
33
+ def load_files(args)
34
+ files = args.last
35
+ create_input_data(*args[0..-2]) do |input_data|
35
36
  files.each { |file| load_file(file, input_data) }
36
37
  end
37
38
  end
@@ -50,7 +51,7 @@ module RgGen
50
51
  .transform_values(&->(f) { f.valid_value_list })
51
52
  end
52
53
 
53
- def create_input_data(&block)
54
+ def create_input_data(*_args, &block)
54
55
  end
55
56
 
56
57
  def create_features(component, *sources)
@@ -4,7 +4,7 @@ module RgGen
4
4
  module Core
5
5
  module InputBase
6
6
  class InputData
7
- def initialize(layer, valid_value_lists)
7
+ def initialize(layer, valid_value_lists, *_args)
8
8
  @layer = layer
9
9
  @valid_value_lists = valid_value_lists
10
10
  @values = Hash.new(NAValue)
@@ -87,8 +87,8 @@ module RgGen
87
87
  caller_location.path.include?('docile')
88
88
  end
89
89
 
90
- def create_child_data(layer, &block)
91
- child_data_class.new(layer, @valid_value_lists, &block)
90
+ def create_child_data(layer, *args, &block)
91
+ child_data_class.new(layer, @valid_value_lists, *args, &block)
92
92
  end
93
93
 
94
94
  def child_data_class
@@ -12,8 +12,8 @@ module RgGen
12
12
  configuration
13
13
  end
14
14
 
15
- def create_input_data(&block)
16
- InputData.new(:root, valid_value_lists, &block)
15
+ def create_input_data(configuration, &block)
16
+ InputData.new(:root, valid_value_lists, configuration, &block)
17
17
  end
18
18
 
19
19
  def find_child_factory(_configuration, register_map)
@@ -38,9 +38,18 @@ module RgGen
38
38
  bit_field: BitField
39
39
  }.freeze
40
40
 
41
- def initialize(layer, valid_value_list)
41
+ def initialize(layer, valid_value_list, configuration)
42
42
  extend(LAYER_EXTENSIONS[layer])
43
- super
43
+ @configuration = configuration
44
+ super(layer, valid_value_list)
45
+ end
46
+
47
+ attr_reader :configuration
48
+
49
+ private
50
+
51
+ def create_child_data(layer, &block)
52
+ super(layer, @configuration, &block)
44
53
  end
45
54
  end
46
55
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module RgGen
4
4
  module Core
5
- VERSION = '0.30.0'
5
+ VERSION = '0.31.0'
6
6
  MAJOR, MINOR, PATCH = VERSION.split('.').map(&:to_i)
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rggen-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taichi Ishitani
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-28 00:00:00.000000000 Z
11
+ date: 2023-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docile
@@ -222,8 +222,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  - !ruby/object:Gem::Version
223
223
  version: '0'
224
224
  requirements: []
225
- rubygems_version: 3.4.10
225
+ rubygems_version: 3.4.17
226
226
  signing_key:
227
227
  specification_version: 4
228
- summary: rggen-core-0.30.0
228
+ summary: rggen-core-0.31.0
229
229
  test_files: []