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
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def base_serializers @base_serializers end |
#custom_types_dir ⇒ Object
Returns the value of attribute custom_types_dir
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def custom_types_dir @custom_types_dir end |
#global_types ⇒ Object
Returns the value of attribute global_types
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def global_types @global_types end |
#name_from_serializer ⇒ Object
Returns the value of attribute name_from_serializer
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def name_from_serializer @name_from_serializer end |
#namespace ⇒ Object
Returns the value of attribute namespace
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def namespace @namespace end |
#output_dir ⇒ Object
Returns the value of attribute output_dir
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def output_dir @output_dir end |
#serializers_dirs ⇒ Object
Returns the value of attribute serializers_dirs
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def serializers_dirs @serializers_dirs end |
#skip_serializer_if ⇒ Object
Returns the value of attribute skip_serializer_if
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def skip_serializer_if @skip_serializer_if end |
#sort_properties_by ⇒ Object
Returns the value of attribute sort_properties_by
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def sort_properties_by @sort_properties_by end |
#sql_to_typescript_type_mapping ⇒ Object
Returns the value of attribute sql_to_typescript_type_mapping
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def sql_to_typescript_type_mapping @sql_to_typescript_type_mapping end |
#transform_keys ⇒ Object
Returns the value of attribute transform_keys
83 84 85 |
# File 'lib/types_from_serializers/generator.rb', line 83 def transform_keys @transform_keys end |
Instance Method Details
#relative_custom_types_dir ⇒ Object
97 98 99 |
# File 'lib/types_from_serializers/generator.rb', line 97 def relative_custom_types_dir @relative_custom_types_dir ||= (custom_types_dir || output_dir.parent).relative_path_from(output_dir) end |
#unknown_type ⇒ Object
101 102 103 |
# File 'lib/types_from_serializers/generator.rb', line 101 def unknown_type sql_to_typescript_type_mapping.default end |