Class: Regex::RawExpression
- Inherits:
-
AtomicExpression
- Object
- Expression
- AtomicExpression
- Regex::RawExpression
- Defined in:
- lib/regex/raw_expression.rb
Overview
A raw expression is a string that will be copied verbatim (as is) in the generated regular expression.
Instance Attribute Summary collapse
-
#raw ⇒ String
(also: #text_repr)
readonly
String representation of a regular expression (sub)pattern.
Attributes inherited from Expression
Instance Method Summary collapse
-
#initialize(rawLiteral) ⇒ RawExpression
constructor
Constructor.
Methods inherited from AtomicExpression
Methods inherited from Expression
Constructor Details
#initialize(rawLiteral) ⇒ RawExpression
Constructor
12 13 14 15 |
# File 'lib/regex/raw_expression.rb', line 12 def initialize(rawLiteral) super() @raw = rawLiteral end |
Instance Attribute Details
#raw ⇒ String (readonly) Also known as: text_repr
Returns String representation of a regular expression (sub)pattern.
8 9 10 |
# File 'lib/regex/raw_expression.rb', line 8 def raw @raw end |