Class: Sord::TypeConverter::Configuration
- Inherits:
-
Object
- Object
- Sord::TypeConverter::Configuration
- Defined in:
- lib/sord/type_converter.rb
Overview
Configuration for how the type converter should work in particular cases.
Instance Attribute Summary collapse
-
#output_language ⇒ Object
The language which the generated types will be converted to - one of ‘:rbi` or `:rbs`.
-
#replace_errors_with_untyped ⇒ Boolean
If true, T.untyped is used instead of SORD_ERROR_ constants for unknown types.
- #replace_unresolved_with_untyped ⇒ Object
Instance Method Summary collapse
-
#initialize(replace_errors_with_untyped:, replace_unresolved_with_untyped:, output_language:) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(replace_errors_with_untyped:, replace_unresolved_with_untyped:, output_language:) ⇒ Configuration
Returns a new instance of Configuration.
100 101 102 103 104 |
# File 'lib/sord/type_converter.rb', line 100 def initialize(replace_errors_with_untyped:, replace_unresolved_with_untyped:, output_language:) @output_language = output_language @replace_errors_with_untyped = replace_errors_with_untyped @replace_unresolved_with_untyped = replace_unresolved_with_untyped end |
Instance Attribute Details
#output_language ⇒ Object
The language which the generated types will be converted to - one of ‘:rbi` or `:rbs`.
108 109 110 |
# File 'lib/sord/type_converter.rb', line 108 def output_language @output_language end |
#replace_errors_with_untyped ⇒ Boolean
Returns If true, T.untyped is used instead of SORD_ERROR_ constants for unknown types.
112 113 114 |
# File 'lib/sord/type_converter.rb', line 112 def replace_errors_with_untyped @replace_errors_with_untyped end |
#replace_unresolved_with_untyped ⇒ Object
116 117 118 |
# File 'lib/sord/type_converter.rb', line 116 def replace_unresolved_with_untyped @replace_unresolved_with_untyped end |