Class: Regex::RawExpression

Inherits:
AtomicExpression show all
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

Attributes inherited from Expression

#begin_anchor, #end_anchor

Instance Method Summary collapse

Methods inherited from AtomicExpression

#atomic?, #done!

Methods inherited from Expression

#atomic?, #cardinality, #options, #to_str

Constructor Details

#initialize(rawLiteral) ⇒ RawExpression

Constructor



10
11
12
13
# File 'lib/regex/raw_expression.rb', line 10

def initialize(rawLiteral)
  super()
  @raw = rawLiteral
end

Instance Attribute Details

#rawObject (readonly) Also known as: text_repr

Returns the value of attribute raw.



7
8
9
# File 'lib/regex/raw_expression.rb', line 7

def raw
  @raw
end