Class: SymbolsParser
Instance Method Summary collapse
Methods inherited from Base
get_sheet_name, #initialize, #reload_sheet, sheet_name, #to_json
Constructor Details
This class inherits a constructor from Base
Instance Method Details
#parse_sheet ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/parser/symbols_parser.rb', line 4 def parse_sheet result = @sheet.to_matrix(2, 1, nil, 3).to_a.inject({}) do |result, arr| result[arr[1].to_s] = { index: arr[0], name: arr[2].to_s, type: arr[2].to_s.include?("WD") ? 'wild' : nil }.compact result end end |