class Regexp::Expression::Group::Options

TODO: should split off OptionsSwitch in v3.0.0. Maybe even make it no longer inherit from Group because it is effectively a terminal expression.

Attributes

option_changes[RW]

Public Instance Methods

initialize_copy(orig) click to toggle source
# File lib/regexp_parser/expression/classes/group.rb, line 26
def initialize_copy(orig)
  self.option_changes = orig.option_changes.dup
  super
end
quantify(*args) click to toggle source
Calls superclass method Regexp::Expression::Base#quantify
# File lib/regexp_parser/expression/classes/group.rb, line 31
def quantify(*args)
  if token == :options_switch
    raise Regexp::Parser::Error, 'Can not quantify an option switch'
  else
    super
  end
end