class Regexp::Expression::Alternation
the API when it comes to handling the alternatives.
This is not a subexpression really, but considering it one simplifies
def <<(exp)
def <<(exp) expressions.last << exp end
def alternative(exp = nil)
def alternative(exp = nil) expressions << (exp ? exp : Alternative.new(level, set_level, conditional_level)) end
def quantify(token, text, min = nil, max = nil, mode = :greedy)
def quantify(token, text, min = nil, max = nil, mode = :greedy) alternatives.last.last.quantify(token, text, min, max, mode) end
def starts_at
def starts_at expressions.first.starts_at end
def to_s(format = :full)
def to_s(format = :full) alternatives.map{|e| e.to_s(format)}.join('|') end