Class: RgGen::Core::OutputBase::Feature
Constant Summary
CodeGeneratable::CODE_PHASES, CodeGeneratable::TEMPLATE_PROCESSOR, CodeGeneratable::VARIABLE_NAMES
Instance Attribute Summary
#component
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from RaiseError
#error
#generate_code, included
#feature_name, #initialize, #inspect
extended, #feature_array_variable_get, #feature_hash_array_variable_get, #feature_hash_variable_fetch, #feature_hash_variable_get, #feaure_scala_variable_get
#attach_context
Class Method Details
.exported_methods ⇒ Object
12
13
14
|
# File 'lib/rggen/core/output_base/feature.rb', line 12
def exported_methods
feature_array_variable_get(:@exported_methods)
end
|
Instance Method Details
47
48
49
50
|
# File 'lib/rggen/core/output_base/feature.rb', line 47
def build
feature_array_variable_get(:@builders)
&.each { |body| instance_exec(&body) }
end
|
#export(*methods) ⇒ Object
52
53
54
55
56
57
58
59
|
# File 'lib/rggen/core/output_base/feature.rb', line 52
def export(*methods)
methods.each do |method|
unless exported_methods(:class)&.include?(method) ||
exported_methods(:object)&.include?(method)
(@exported_methods ||= []) << method
end
end
end
|
#exported_methods(scope) ⇒ Object
61
62
63
64
65
66
67
|
# File 'lib/rggen/core/output_base/feature.rb', line 61
def exported_methods(scope)
if scope == :class
self.class.exported_methods
else
@exported_methods
end
end
|
#post_initialize ⇒ Object
38
39
40
|
# File 'lib/rggen/core/output_base/feature.rb', line 38
def post_initialize
define_layer_methods
end
|
#pre_build ⇒ Object
42
43
44
45
|
# File 'lib/rggen/core/output_base/feature.rb', line 42
def pre_build
feature_array_variable_get(:@pre_builders)
&.each { |body| instance_exec(&body) }
end
|
#write_file(directory = nil) ⇒ Object
69
70
71
72
|
# File 'lib/rggen/core/output_base/feature.rb', line 69
def write_file(directory = nil)
feaure_scala_variable_get(:@file_writer)
&.write_file(self, directory)
end
|