class Regexp::Expression::Conditional::Expression
def <<(exp)
def <<(exp) expressions.last << exp end
def add_sequence(active_opts = {})
def add_sequence(active_opts = {}) raise TooManyBranches.new if branches.length == 2 params = { conditional_level: conditional_level + 1 } Branch.add_to(self, params, active_opts) end
def branches
def branches select { |subexp| subexp.is_a?(Sequence) } end
def condition
def condition find { |subexp| subexp.is_a?(Condition) } end
def condition=(exp)
def condition=(exp) expressions.delete(condition) expressions.unshift(exp) end
def reference
def reference condition.reference end
def to_s(format = :full)
def to_s(format = :full) "#{text}#{condition}#{branches.join('|')})#{quantifier_affix(format)}" end