Class: TypesFromSerializers::Config
- Inherits:
-
Struct
- Object
- Struct
- TypesFromSerializers::Config
- Defined in:
- lib/types_from_serializers/generator.rb
Overview
Internal: The configuration for TypeScript generation.
Instance Attribute Summary collapse
-
#base_serializers ⇒ Object
Returns the value of attribute base_serializers.
-
#custom_types_dir ⇒ Object
Returns the value of attribute custom_types_dir.
-
#global_types ⇒ Object
Returns the value of attribute global_types.
-
#name_from_serializer ⇒ Object
Returns the value of attribute name_from_serializer.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#serializers_dirs ⇒ Object
Returns the value of attribute serializers_dirs.
-
#skip_serializer_if ⇒ Object
Returns the value of attribute skip_serializer_if.
-
#sort_properties_by ⇒ Object
Returns the value of attribute sort_properties_by.
-
#sql_to_typescript_type_mapping ⇒ Object
Returns the value of attribute sql_to_typescript_type_mapping.
-
#transform_keys ⇒ Object
Returns the value of attribute transform_keys.
Instance Method Summary collapse
Instance Attribute Details
#base_serializers ⇒ Object
Returns the value of attribute base_serializers
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def base_serializers @base_serializers end |
#custom_types_dir ⇒ Object
Returns the value of attribute custom_types_dir
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def custom_types_dir @custom_types_dir end |
#global_types ⇒ Object
Returns the value of attribute global_types
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def global_types @global_types end |
#name_from_serializer ⇒ Object
Returns the value of attribute name_from_serializer
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def name_from_serializer @name_from_serializer end |
#namespace ⇒ Object
Returns the value of attribute namespace
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def namespace @namespace end |
#output_dir ⇒ Object
Returns the value of attribute output_dir
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def output_dir @output_dir end |
#serializers_dirs ⇒ Object
Returns the value of attribute serializers_dirs
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def serializers_dirs @serializers_dirs end |
#skip_serializer_if ⇒ Object
Returns the value of attribute skip_serializer_if
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def skip_serializer_if @skip_serializer_if end |
#sort_properties_by ⇒ Object
Returns the value of attribute sort_properties_by
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def sort_properties_by @sort_properties_by end |
#sql_to_typescript_type_mapping ⇒ Object
Returns the value of attribute sql_to_typescript_type_mapping
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def sql_to_typescript_type_mapping @sql_to_typescript_type_mapping end |
#transform_keys ⇒ Object
Returns the value of attribute transform_keys
88 89 90 |
# File 'lib/types_from_serializers/generator.rb', line 88 def transform_keys @transform_keys end |
Instance Method Details
#relative_custom_types_dir ⇒ Object
102 103 104 |
# File 'lib/types_from_serializers/generator.rb', line 102 def relative_custom_types_dir @relative_custom_types_dir ||= (custom_types_dir || output_dir.parent).relative_path_from(output_dir) end |
#unknown_type ⇒ Object
106 107 108 |
# File 'lib/types_from_serializers/generator.rb', line 106 def unknown_type sql_to_typescript_type_mapping.default end |