Class: JsRegex::Conversion

Inherits:
Object
  • Object
show all
Defined in:
lib/js_regex/conversion.rb

Overview

This class acts as a facade, passing a regex to the converters.

::of returns a source String, options String, and warnings Array.

Class Method Summary collapse

Class Method Details

.of(input, options: nil) ⇒ Object



15
16
17
18
19
# File 'lib/js_regex/conversion.rb', line 15

def of(input, options: nil)
  source, warnings = convert_source(input)
  options_string   = convert_options(input, options)
  [source, options_string, warnings]
end