Class: JsRegex::Converter::Base

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

Overview

Template class. Implement #convert_data in subclasses.

Instance Method Summary collapse

Instance Method Details

#convert(expression, context) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/js_regex/converter/base.rb', line 9

def convert(expression, context)
  self.context    = context
  self.expression = expression

  source = convert_data
  apply_quantifier(source)
end