class Regexp::Expression::EscapeSequence::CodepointList

def char

def char
  raise NoMethodError, 'CodepointList responds only to #chars'
end

def chars

def chars
  codepoints.map { |cp| cp.chr('utf-8') }
end

def codepoint

def codepoint
  raise NoMethodError, 'CodepointList responds only to #codepoints'
end

def codepoints

def codepoints
  text.scan(/\h+/).map(&:hex)
end

def match_length

def match_length
  MatchLength.new(self, base: codepoints.count)
end