Class: Foobara::RemoteGenerator::Services::ModelManifestGenerator
- Inherits:
-
ManifestGenerator
- Object
- FilesGenerator
- TypescriptFromManifestBaseGenerator
- ManifestGenerator
- Foobara::RemoteGenerator::Services::ModelManifestGenerator
- Defined in:
- foobara-typescript-remote-command-generator-0.0.18/src/remote_generator/services/model_manifest_generator.rb
Direct Known Subclasses
Constant Summary
Constants included from TruncatedInspect
Instance Attribute Summary
Attributes inherited from FilesGenerator
#belongs_to_dependency_group, #relevant_manifest
Instance Method Summary collapse
-
#model_prefix ⇒ Object
TODO: DRY this up.
- #target_path ⇒ Object
Methods inherited from ManifestGenerator
Methods inherited from TypescriptFromManifestBaseGenerator
#==, #attributes_to_ts_type, #custom_type_to_ts_type_name, #dependency_group, #dependency_roots, #foobara_type_to_ts_type, #hash, #import_destructure, #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
Methods inherited from FilesGenerator
#==, #absolute_template_path, #applicable?, #dependencies, #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_path, #template_string, #templates_dir
Methods included from TruncatedInspect
Constructor Details
This class inherits a constructor from Foobara::RemoteGenerator::Services::TypescriptFromManifestBaseGenerator
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Foobara::FilesGenerator
Instance Method Details
#model_prefix ⇒ Object
TODO: DRY this up
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'foobara-typescript-remote-command-generator-0.0.18/src/remote_generator/services/model_manifest_generator.rb', line 10 def model_prefix path = scoped_prefix if path && !path.empty? if path.first == "Types" path[1..] else path end else [] end end |
#target_path ⇒ Object
5 6 7 |
# File 'foobara-typescript-remote-command-generator-0.0.18/src/remote_generator/services/model_manifest_generator.rb', line 5 def target_path [*domain.scoped_full_path, "Types", *model_prefix, scoped_short_name, "manifest.json"] end |