rggen-core 0.11.0 → 0.12.0
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/rggen/core/base/feature.rb +2 -0
- data/lib/rggen/core/input_base/component.rb +7 -3
- data/lib/rggen/core/input_base/feature.rb +22 -0
- data/lib/rggen/core/output_base/component.rb +4 -0
- data/lib/rggen/core/output_base/feature.rb +1 -0
- data/lib/rggen/core/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8dee87d7320d747018f9f7b739024fe776cb30ad25fd8d64c89c24d5e4bbaf2
|
4
|
+
data.tar.gz: 1c78c53f111dd3cf10dda3ad836933a9044730d0ae1cd6a2436dd0ea92733770
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 784f1269c603f6c1bed63aa25c1a2030414cf685fde796494cd4c6b00a976b6b46f90c118589644fe5eb1df6ecd21db6ceef81c63f6c35900b85543ca617c949
|
7
|
+
data.tar.gz: e74c890fea65661e48d640df7bc6f8827ca0668d5f0aafaf7a4e77615e8cf2a8bae9a742d9e25490f73513c1d2a6a21cb831d455fac58cad758bf7ddce1a6f92
|
@@ -10,12 +10,16 @@ module RgGen
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def properties
|
13
|
-
|
13
|
+
features.flat_map(&:properties)
|
14
14
|
end
|
15
15
|
|
16
16
|
def verify(scope)
|
17
|
-
|
18
|
-
|
17
|
+
features.each { |feature| feature.verify(scope) }
|
18
|
+
children.each { |child| child.verify(scope) } if scope == :all
|
19
|
+
end
|
20
|
+
|
21
|
+
def printables
|
22
|
+
features.select(&:printable?).flat_map(&:printables).to_h
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
@@ -56,12 +56,20 @@ module RgGen
|
|
56
56
|
|
57
57
|
attr_reader :verifiers
|
58
58
|
|
59
|
+
def printable(name, &body)
|
60
|
+
@printables ||= {}
|
61
|
+
@printables[name] = body
|
62
|
+
end
|
63
|
+
|
64
|
+
attr_reader :printables
|
65
|
+
|
59
66
|
def inherited(subclass)
|
60
67
|
super
|
61
68
|
export_instance_variable(:@properties, subclass, &:dup)
|
62
69
|
export_instance_variable(:@ignore_empty_value, subclass)
|
63
70
|
export_instance_variable(:@builders, subclass, &:dup)
|
64
71
|
export_instance_variable(:@input_matcher, subclass)
|
72
|
+
export_instance_variable(:@printables, subclass, &:dup)
|
65
73
|
export_verifiers(subclass) if @verifiers
|
66
74
|
end
|
67
75
|
|
@@ -87,6 +95,16 @@ module RgGen
|
|
87
95
|
verified?(scope) || do_verify(scope)
|
88
96
|
end
|
89
97
|
|
98
|
+
def printables
|
99
|
+
helper
|
100
|
+
.printables
|
101
|
+
&.map { |name, body| [name, printable(name, body)] }
|
102
|
+
end
|
103
|
+
|
104
|
+
def printable?
|
105
|
+
!helper.printables.nil?
|
106
|
+
end
|
107
|
+
|
90
108
|
private
|
91
109
|
|
92
110
|
def do_build(args)
|
@@ -125,6 +143,10 @@ module RgGen
|
|
125
143
|
.each { |verifier| verifier.verify(self) }
|
126
144
|
(@verified ||= {})[scope] = true
|
127
145
|
end
|
146
|
+
|
147
|
+
def printable(name, body)
|
148
|
+
body ? instance_exec(&body) : __send__(name)
|
149
|
+
end
|
128
150
|
end
|
129
151
|
end
|
130
152
|
end
|
data/lib/rggen/core/version.rb
CHANGED
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.
|
4
|
+
version: 0.12.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: 2019-08-
|
11
|
+
date: 2019-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docile
|
@@ -184,5 +184,5 @@ requirements: []
|
|
184
184
|
rubygems_version: 3.0.3
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
|
-
summary: rggen-core-0.
|
187
|
+
summary: rggen-core-0.12.0
|
188
188
|
test_files: []
|