Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def load_products
- File.open(@input_database, "r") do |file|
- product_list = REXML::Document.new(file)
- product_list.root.elements.each do |product_elements|
- code = student_element.elements["product code"].text
- name = student_element.elements["name"].text
- price = student_element.elements["price"].text
- product = Produkt.new(code, name, price)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement