Class: Regex::MonadicExpression
- Inherits:
-
CompoundExpression
- Object
- Expression
- CompoundExpression
- Regex::MonadicExpression
- Defined in:
- lib/regex/monadic_expression.rb
Overview
Abstract class. An element that is part of a regular expression & that can have up to one child sub-expression.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#child ⇒ Object
readonly
The (optional) child sub-expression.
Attributes inherited from Expression
Instance Method Summary collapse
-
#initialize(theChild) ⇒ MonadicExpression
constructor
Constructor.
Methods inherited from CompoundExpression
Methods inherited from Expression
#atomic?, #cardinality, #options, #to_str
Constructor Details
#initialize(theChild) ⇒ MonadicExpression
Constructor.
13 14 15 16 |
# File 'lib/regex/monadic_expression.rb', line 13 def initialize(theChild) super() @child = theChild end |
Instance Attribute Details
#child ⇒ Object (readonly)
The (optional) child sub-expression
10 11 12 |
# File 'lib/regex/monadic_expression.rb', line 10 def child @child end |