Class: Regex::CharClass
- Inherits:
-
PolyadicExpression
- Object
- Expression
- CompoundExpression
- PolyadicExpression
- Regex::CharClass
- Defined in:
- lib/regex/char_class.rb
Overview
Abstract class. A n-ary matching operator. It succeeds when one child expression succeeds to match the subject text.
Constant Summary collapse
- Metachars =
These are characters with special meaning in character classes
']\^-'.codepoints
Instance Attribute Summary collapse
-
#negated ⇒ Object
readonly
A flag that indicates whether the character is negated.
Attributes inherited from PolyadicExpression
Attributes inherited from Expression
Instance Method Summary collapse
-
#initialize(to_negate, *theChildren) ⇒ CharClass
constructor
Constructor.
Methods inherited from PolyadicExpression
#<<, #df_visitor, #done!, #lazy!
Methods inherited from CompoundExpression
Methods inherited from Expression
Constructor Details
#initialize(to_negate, *theChildren) ⇒ CharClass
Constructor.
15 16 17 18 |
# File 'lib/regex/char_class.rb', line 15 def initialize(to_negate, *theChildren) super(theChildren) @negated = to_negate end |
Instance Attribute Details
#negated ⇒ Object (readonly)
A flag that indicates whether the character is negated
12 13 14 |
# File 'lib/regex/char_class.rb', line 12 def negated @negated end |