Class: RgGen::Core::InputBase::Component
Instance Attribute Summary
#children, #component_index, #depth, #layer, #parent
Instance Method Summary
collapse
#add_child, #ancestors, #component_name, #feature, #features, #initialize, #need_children?, #need_no_children
Instance Method Details
#add_feature(feature) ⇒ Object
7
8
9
10
|
# File 'lib/rggen/core/input_base/component.rb', line 7
def add_feature(feature)
super
define_proxy_calls(feature, feature.properties)
end
|
#document_only ⇒ Object
12
13
14
|
# File 'lib/rggen/core/input_base/component.rb', line 12
def document_only
@document_only = true
end
|
#document_only? ⇒ Boolean
16
17
18
|
# File 'lib/rggen/core/input_base/component.rb', line 16
def document_only?
instance_variable_defined?(:@document_only) && @document_only
end
|
#post_build ⇒ Object
24
25
26
|
# File 'lib/rggen/core/input_base/component.rb', line 24
def post_build
features.each(&:post_build)
end
|
#printables ⇒ Object
33
34
35
|
# File 'lib/rggen/core/input_base/component.rb', line 33
def printables
features.select(&:printable?).flat_map(&:printables).to_h
end
|
#properties ⇒ Object
20
21
22
|
# File 'lib/rggen/core/input_base/component.rb', line 20
def properties
features.flat_map(&:properties)
end
|
#verify(scope) ⇒ Object
28
29
30
31
|
# File 'lib/rggen/core/input_base/component.rb', line 28
def verify(scope)
features.each { |feature| feature.verify(scope) }
children.each { |child| child.verify(scope) } if scope == :all
end
|