Class: Foobara::RemoteGenerator::Services::OrganizationGenerator
Constant Summary
TruncatedInspect::MAX_LENGTH
Instance Attribute Summary
#belongs_to_dependency_group, #relevant_manifest
Instance Method Summary
collapse
#==, #attributes_to_ts_type, #custom_type_to_ts_type_name, #dependency_group, #dependency_roots, #foobara_type_to_ts_type, #hash, #import_path, #import_path_array, #initialize, manifest_to_generator_classes, #model_to_ts_model_name, #parent, #templates_dir, #ts_instance_full_name, #ts_instance_full_path, #ts_instance_path, #ts_type_full_path, #value_to_ts_value
#==, #absolute_template_path, #applicable?, #dependencies_to_generate, #eql?, #erb_template, #generate, generator_for, #generator_for, generators_for, #generators_for, #hash, #initialize, manifest_to_generator_classes, #method_missing, #path_to_root, #respond_to_missing?, #target_dir, #template_string, #templates_dir
#inspect, truncating
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Foobara::FilesGenerator
Instance Method Details
#dependencies ⇒ Object
31
32
33
|
# File 'foobara-typescript-remote-command-generator-0.0.18/src/remote_generator/services/organization_generator.rb', line 31
def dependencies
domain_generators
end
|
#domain_generators ⇒ Object
25
26
27
28
29
|
# File 'foobara-typescript-remote-command-generator-0.0.18/src/remote_generator/services/organization_generator.rb', line 25
def domain_generators
@domain_generators ||= organization_manifest.domains.map do |domain_manifest|
DomainGenerator.new(domain_manifest)
end
end
|
#import_destructure ⇒ Object
9
10
11
|
# File 'foobara-typescript-remote-command-generator-0.0.18/src/remote_generator/services/organization_generator.rb', line 9
def import_destructure
"* as #{organization_name}"
end
|
#organization_name ⇒ Object
35
36
37
|
# File 'foobara-typescript-remote-command-generator-0.0.18/src/remote_generator/services/organization_generator.rb', line 35
def organization_name
scoped_name || "GlobalOrganization"
end
|
#target_path ⇒ Object
13
14
15
16
17
18
19
|
# File 'foobara-typescript-remote-command-generator-0.0.18/src/remote_generator/services/organization_generator.rb', line 13
def target_path
if global?
["GlobalOrganization", "index.ts"]
else
[*scoped_full_path, "index.ts"]
end
end
|
#template_path ⇒ Object
21
22
23
|
# File 'foobara-typescript-remote-command-generator-0.0.18/src/remote_generator/services/organization_generator.rb', line 21
def template_path
"Organization.ts.erb"
end
|