class Samovar::Many
def initialize(key, description, stop: /^-/)
def initialize(key, description, stop: /^-/) @key = key @description = description @stop = stop end
def parse(input)
def parse(input) if @stop and stop_index = input.index{|item| @stop === item} input.shift(stop_index) else input.shift(input.size) end end
def to_a
def to_a [to_s, @description] end
def to_s
def to_s "<#{key}...>" end