Class: Foobara::RemoteGenerator::Generators::RemoteCommandGenerator

Inherits:
TypescriptFromManifestBaseGenerator show all
Defined in:
foobara-typescript-remote-command-generator-1.3.1/src/generators/remote_command_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 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, #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, #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, #initialize, manifest_to_generator_classes, #method_missing, #path_to_root, #respond_to_missing?, #target_dir, #target_path, #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

#domainObject

TODO: awkward to have this here hmmm… maybe create a manifest for these static files? something doesn’t feel right about this.



31
32
33
# File 'src/generators/remote_command_generator.rb', line 31

def domain
  Manifest::Domain.new(root_manifest, [:domain, domain_reference])
end

#domain_referenceObject



25
26
27
# File 'src/generators/remote_command_generator.rb', line 25

def domain_reference
  "global_organization::global_domain"
end

#hashObject



21
22
23
# File 'src/generators/remote_command_generator.rb', line 21

def hash
  template_path.hash
end

#import_destructureObject



5
6
7
# File 'src/generators/remote_command_generator.rb', line 5

def import_destructure
  ts_instance_path.first
end

#scoped_full_nameObject



35
36
37
# File 'src/generators/remote_command_generator.rb', line 35

def scoped_full_name
  ts_instance_path.first
end

#template_pathObject



17
18
19
# File 'src/generators/remote_command_generator.rb', line 17

def template_path
  ["base", "RemoteCommand.ts.erb"]
end

#ts_instance_full_pathObject



13
14
15
# File 'src/generators/remote_command_generator.rb', line 13

def ts_instance_full_path
  ["RemoteCommand"]
end

#ts_instance_pathObject



9
10
11
# File 'src/generators/remote_command_generator.rb', line 9

def ts_instance_path
  ["RemoteCommand"]
end