Class: Foobara::RemoteGenerator::Generators::LoadedEntityGenerator

Inherits:
EntityGenerator show all
Defined in:
foobara-typescript-remote-command-generator-1.3.1/src/generators/loaded_entity_generator.rb

Constant Summary

Constants included from TruncatedInspect

TruncatedInspect::MAX_LENGTH

Instance Attribute Summary

Attributes inherited from FilesGenerator

#belongs_to_dependency_group, #relevant_manifest

Instance Method Summary collapse

Methods inherited from EntityGenerator

#association_property_paths_ts, #attribute_names, #entity_name, #entity_name_downcase, #entity_short_name, #primary_key_name, #primary_key_ts_type, #will_define

Methods inherited from ModelGenerator

#import_destructure, #model_name, #model_name_downcase, #model_prefix, #model_short_name, new

Methods inherited from TypeGenerator

#aggregate_attributes_ts_type, #atom_attributes_ts_type, #attribute_names, #attributes_type_ts_type, #custom_type_generators, #dependencies, lru_cache, #model_generators, new, #scoped_full_path, #type_guts, #type_name, #type_name_downcase, #type_prefix, #type_short_name

Methods inherited from TypescriptFromManifestBaseGenerator

#==, #attributes_to_ts_type, #auto_dirty_queries?, #collision_winners, #custom_type_to_ts_type_name, #dependency_group, #dependency_roots, #domain_name, #foobara_type_to_ts_type, #hash, #import_destructure, #import_path, #import_path_array, #initialize, manifest_to_generator_classes, #model_to_ts_model_name, #organization_name, #parent, #path_to_root, #templates_dir, #ts_instance_full_name, #ts_instance_full_path, #value_to_ts_value, #will_define

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_string, #templates_dir

Methods included from TruncatedInspect

#inspect, truncating

Constructor Details

This class inherits a constructor from Foobara::RemoteGenerator::Generators::TypescriptFromManifestBaseGenerator

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Foobara::FilesGenerator

Instance Method Details

#generated_typeObject



19
20
21
# File 'src/generators/loaded_entity_generator.rb', line 19

def generated_type
  "Loaded#{scoped_short_name}"
end

#target_pathObject



7
8
9
# File 'src/generators/loaded_entity_generator.rb', line 7

def target_path
  [*super[..-2], "Loaded.ts"]
end

#template_pathObject



11
12
13
# File 'src/generators/loaded_entity_generator.rb', line 11

def template_path
  ["Entity", "Loaded.ts.erb"]
end

#ts_instance_pathObject



15
16
17
# File 'src/generators/loaded_entity_generator.rb', line 15

def ts_instance_path
  [*model_prefix, generated_type]
end