Class: RegularExpression::NFA::Transition::Range
- Inherits:
-
Object
- Object
- RegularExpression::NFA::Transition::Range
- Defined in:
- lib/regular_expression/nfa.rb
Instance Attribute Summary collapse
-
#invert ⇒ Object
readonly
bool.
-
#left ⇒ Object
readonly
String.
-
#right ⇒ Object
readonly
String.
-
#state ⇒ Object
readonly
State.
Instance Method Summary collapse
-
#initialize(state, left, right, invert: false) ⇒ Range
constructor
A new instance of Range.
- #label ⇒ Object
Constructor Details
#initialize(state, left, right, invert: false) ⇒ Range
Returns a new instance of Range.
99 100 101 102 103 104 |
# File 'lib/regular_expression/nfa.rb', line 99 def initialize(state, left, right, invert: false) @state = state @left = left @right = right @invert = invert end |
Instance Attribute Details
#invert ⇒ Object (readonly)
bool
97 98 99 |
# File 'lib/regular_expression/nfa.rb', line 97 def invert @invert end |
#left ⇒ Object (readonly)
String
96 97 98 |
# File 'lib/regular_expression/nfa.rb', line 96 def left @left end |
#right ⇒ Object (readonly)
String
96 97 98 |
# File 'lib/regular_expression/nfa.rb', line 96 def right @right end |
#state ⇒ Object (readonly)
State
95 96 97 |
# File 'lib/regular_expression/nfa.rb', line 95 def state @state end |
Instance Method Details
#label ⇒ Object
106 107 108 |
# File 'lib/regular_expression/nfa.rb', line 106 def label "#{left}-#{right}" end |