Class: PackwizardParser::ListParser
- Inherits:
-
Object
- Object
- PackwizardParser::ListParser
- Defined in:
- lib/packwizard_parser/list_parser.rb
Overview
Parser for extracting PackWizard list data from JSON.
Instance Method Summary collapse
-
#parse(data, category_parser:, item_parser:) ⇒ List
Extract the lists name and description.
Instance Method Details
#parse(data, category_parser:, item_parser:) ⇒ List
Extract the lists name and description. Extract the categories and their items
13 14 15 16 17 18 19 |
# File 'lib/packwizard_parser/list_parser.rb', line 13 def parse(data, category_parser:, item_parser:) List.new( name: extract_name(data), description: extract_description(data), categories: category_parser.parse_all(data, item_parser: item_parser) ) end |