Class: JsRegex::Converter::PropertyConverter

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

Overview

Template class implementation.

Uses the ‘character_set` and `regexp_property_values` gems to get the codepoints matched by the property and build a set string from them.

Class Method Summary collapse

Methods inherited from Base

#convert

Class Method Details

.mapObject

A map of normalized Ruby property names to names supported by ES2018+.



14
15
16
# File 'lib/js_regex/converter/property_converter.rb', line 14

def self.map
  @map ||= File.read("#{__dir__}/property_map.csv").scan(/(.+),(.+)/).to_h
end