Class: JsRegex::Conversion
- Inherits:
-
Object
- Object
- JsRegex::Conversion
- Defined in:
- lib/js_regex/conversion.rb
Overview
This class acts as a facade, passing a Regexp to the Converters.
::of returns a source String, options String, warnings Array, target String.
Class Method Summary collapse
Class Method Details
.of(input, options: nil, target: Target::ES2009, fail_fast: false) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/js_regex/conversion.rb', line 16 def of(input, options: nil, target: Target::ES2009, fail_fast: false) target = Target.cast(target) source, warnings, extra_opts = convert_source(input, target, fail_fast) = (input, , extra_opts) [source, , warnings, target] end |