# File lib/pickle/parser.rb, line 14 def parse_fields(fields) if fields.blank? {} elsif fields =~ /^#{match_fields}$/ fields.scan(/(#{match_field})(?:,|$)/).inject({}) do |m, match| m.merge(parse_field(match[0])) end else raise ArgumentError, "The fields string is not in the correct format.\n\n'#{fields}' did not match: #{match_fields}" end end