Sha256: 79d0eb82ffc808bd5b4a50801232c0ae57a6867616166158e5c36bf0a58e1b79
Contents?: true
Size: 430 Bytes
Versions: 5
Compression:
Stored size: 430 Bytes
Contents
module Qlang module Parser module MatrixParser include Base def execute(lexed_string, trans: false) lexed_string.rms!(')','(', 't') rows = lexed_string.split(/ *; */).map(&:split_by_sp) rows.all? { |row| row.count == rows.first.count } if trans rows = rows.transpose end MatrixApi.execute(rows) end module_function :execute end end end
Version data entries
5 entries across 5 versions & 1 rubygems