Class: Regex::Repetition
- Inherits:
-
MonadicExpression
- Object
- Expression
- CompoundExpression
- MonadicExpression
- Regex::Repetition
- Defined in:
- lib/regex/repetition.rb
Overview
Abstract class. An unary matching operator. It succeeds when the specified repetition of the child expression succeeds to match the subject text in the same serial arrangement
Instance Attribute Summary collapse
-
#multiplicity ⇒ Object
readonly
Returns the value of attribute multiplicity.
Attributes inherited from MonadicExpression
Attributes inherited from Expression
Instance Method Summary collapse
-
#initialize(childExpressionToRepeat, aMultiplicity) ⇒ Repetition
constructor
Constructor.
Methods inherited from CompoundExpression
Methods inherited from Expression
#atomic?, #cardinality, #options, #to_str
Constructor Details
#initialize(childExpressionToRepeat, aMultiplicity) ⇒ Repetition
Constructor.
13 14 15 16 |
# File 'lib/regex/repetition.rb', line 13 def initialize(childExpressionToRepeat, aMultiplicity) super(childExpressionToRepeat) @multiplicity = aMultiplicity end |
Instance Attribute Details
#multiplicity ⇒ Object (readonly)
Returns the value of attribute multiplicity.
10 11 12 |
# File 'lib/regex/repetition.rb', line 10 def multiplicity @multiplicity end |