Class: RegularExpression::NFA::Transition::Invert

Inherits:
Object
  • Object
show all
Defined in:
lib/regular_expression/nfa.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(state, values) ⇒ Invert

Returns a new instance of Invert.



84
85
86
87
# File 'lib/regular_expression/nfa.rb', line 84

def initialize(state, values)
  @state = state
  @values = values
end

Instance Attribute Details

#stateObject (readonly)

State



81
82
83
# File 'lib/regular_expression/nfa.rb', line 81

def state
  @state
end

#valuesObject (readonly)



82
83
84
# File 'lib/regular_expression/nfa.rb', line 82

def values
  @values
end

Instance Method Details

#labelObject



89
90
91
# File 'lib/regular_expression/nfa.rb', line 89

def label
  "[^#{values.join}]"
end