Sha256: 7a1ab48927b3d0365aa4a1accc97892682f7c7458769fd0ebd1efb70aca20fd1
Contents?: true
Size: 825 Bytes
Versions: 10
Compression:
Stored size: 825 Bytes
Contents
# frozen_string_literal: true module Katalyst module Tables module Collection module Query class ArrayValueParser < ValueParser def initialize(...) super @value = [] end # @param query [StringScanner] def parse(query) @query = query query.scan(/#{'\['}\s*/) until query.eos? break unless take_quoted_value || take_unquoted_value break unless take_delimiter end query.scan(/\s*#{'\]'}?/) @end = query.charpos self end def take_delimiter query.scan(/\s*#{','}\s*/) end def value=(value) @value << value end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems