Class: JsRegex::Converter::PropertyConverter

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

Overview

Template class implementation.

Direct Known Subclasses

NonpropertyConverter

Instance Attribute Summary

Attributes inherited from Base

#context, #target

Class Method Summary collapse

Methods inherited from Base

#convert, #initialize

Constructor Details

This class inherits a constructor from JsRegex::Converter::Base

Class Method Details

.property_replacement(property_name, negated = nil) ⇒ Object



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

def property_replacement(property_name, negated = nil)
  replacement = PROPERTY_MAP[property_name.downcase.to_sym]
  negated ? negated_property_replacement(replacement) : replacement
end