Class: Oxc::Transformer
- Inherits:
-
Object
- Object
- Oxc::Transformer
- Defined in:
- lib/oxc/transformer.rb,
sig/oxc/transformer.rbs
Instance Attribute Summary collapse
- #options ⇒ Hash[Symbol, untyped] readonly
Instance Method Summary collapse
-
#initialize(**options) ⇒ Transformer
constructor
: (?filename: String?, ?lang: String?, ?source_type: String?, ?cwd: String?, ?target: targets?, ?jsx: jsx?, ?typescript: typescript?, ?assumptions: assumptions?, ?decorator: decorator?, ?helpers: helpers?, ?define: Hash[String, String]?, ?inject: inject?, ?minify: minify?, ?codegen: codegen?, ?sourcemap: bool, ?strict: bool) -> void.
-
#inspect ⇒ String
: () -> String.
-
#transform(source, **overrides) ⇒ Oxc::TransformResult
(also: #call)
: (String, ?filename: String?, ?lang: String?, ?source_type: String?, ?cwd: String?, ?target: targets?, ?jsx: jsx?, ?typescript: typescript?, ?assumptions: assumptions?, ?decorator: decorator?, ?helpers: helpers?, ?define: Hash[String, String]?, ?inject: inject?, ?minify: minify?, ?codegen: codegen?, ?sourcemap: bool, ?strict: bool) -> Oxc::TransformResult.
-
#with(**overrides) ⇒ Oxc::Transformer
: (?filename: String?, ?lang: String?, ?source_type: String?, ?cwd: String?, ?target: targets?, ?jsx: jsx?, ?typescript: typescript?, ?assumptions: assumptions?, ?decorator: decorator?, ?helpers: helpers?, ?define: Hash[String, String]?, ?inject: inject?, ?minify: minify?, ?codegen: codegen?, ?sourcemap: bool, ?strict: bool) -> Oxc::Transformer.
Constructor Details
#initialize(**options) ⇒ Transformer
: (?filename: String?, ?lang: String?, ?source_type: String?, ?cwd: String?, ?target: targets?, ?jsx: jsx?, ?typescript: typescript?, ?assumptions: assumptions?, ?decorator: decorator?, ?helpers: helpers?, ?define: Hash[String, String]?, ?inject: inject?, ?minify: minify?, ?codegen: codegen?, ?sourcemap: bool, ?strict: bool) -> void
8 9 10 11 12 |
# File 'lib/oxc/transformer.rb', line 8 def initialize(**) @options = .transform_keys(&:to_sym).freeze freeze end |
Instance Attribute Details
#options ⇒ Hash[Symbol, untyped] (readonly)
5 6 7 |
# File 'lib/oxc/transformer.rb', line 5 def @options end |
Instance Method Details
#inspect ⇒ String
: () -> String
27 28 29 |
# File 'lib/oxc/transformer.rb', line 27 def inspect "#<#{self.class.name} #{.inspect}>" end |
#transform(source, **overrides) ⇒ Oxc::TransformResult Also known as: call
: (String, ?filename: String?, ?lang: String?, ?source_type: String?, ?cwd: String?, ?target: targets?, ?jsx: jsx?, ?typescript: typescript?, ?assumptions: assumptions?, ?decorator: decorator?, ?helpers: helpers?, ?define: Hash[String, String]?, ?inject: inject?, ?minify: minify?, ?codegen: codegen?, ?sourcemap: bool, ?strict: bool) -> Oxc::TransformResult
15 16 17 |
# File 'lib/oxc/transformer.rb', line 15 def transform(source, **overrides) Oxc.transform(source, **, **overrides) end |
#with(**overrides) ⇒ Oxc::Transformer
: (?filename: String?, ?lang: String?, ?source_type: String?, ?cwd: String?, ?target: targets?, ?jsx: jsx?, ?typescript: typescript?, ?assumptions: assumptions?, ?decorator: decorator?, ?helpers: helpers?, ?define: Hash[String, String]?, ?inject: inject?, ?minify: minify?, ?codegen: codegen?, ?sourcemap: bool, ?strict: bool) -> Oxc::Transformer
22 23 24 |
# File 'lib/oxc/transformer.rb', line 22 def with(**overrides) self.class.new(**, **overrides) end |