class Regexp::Expression::Conditional::Expression
def <<(exp)
def <<(exp) expressions.last << exp end
def branch(exp = nil)
def branch(exp = nil) raise TooManyBranches.new if branches.length == 2 sequence = Branch.new(level, set_level, conditional_level + 1) expressions << sequence branches << expressions.last end
def condition=(exp)
def condition=(exp) @condition = exp expressions << exp end
def initialize(token, options = {})
def initialize(token, options = {}) super @branches = [] end
def quantify(token, text, min = nil, max = nil, mode = :greedy)
def quantify(token, text, min = nil, max = nil, mode = :greedy) branches.last.last.quantify(token, text, min, max, mode) end
def to_s(_format = :full)
def to_s(_format = :full) text + condition.text + branches.join('|') + ')' end