class Egis::OutputParser
@!visibility private
Public Instance Methods
parse(output, types)
click to toggle source
# File lib/egis/output_parser.rb, line 6 def parse(output, types) header, *content = output serializers = serializers(header, types) content.map do |row| row.zip(serializers).map do |string, serializer| serializer.load(string) end end end
Private Instance Methods
serializers(row, types)
click to toggle source
# File lib/egis/output_parser.rb, line 20 def serializers(row, types) row.zip(types).map { |_, type| type ? Types.serializer(type) : Types::DefaultSerializer.new } end