From d3e22bafd1130a1efa4588f06c44c40e2cd60f63 Mon Sep 17 00:00:00 2001 From: Magdalena Kalin Date: Wed, 16 Oct 2019 22:18:59 +0200 Subject: [PATCH] Add newline to fields --- lol.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lol.rb b/lol.rb index bc2e2e4..77e3e87 100644 --- a/lol.rb +++ b/lol.rb @@ -4,12 +4,11 @@ require_relative 'Type' require_relative 'functional_functions' require_relative 'Filter' - - # Hi! Steffan was here... container_obj = "ferries" + def construct_class(name_of_class, parameters, to_string_template) sorting_one = Type.new("String", "Name") sorting_two = Type.new("int", "Length") @@ -21,7 +20,7 @@ def construct_class(name_of_class, parameters, to_string_template) fields = "" parameters.each do |x| - fields += "private #{x[:type]} #{x[:name]};" + fields += "private #{x[:type]} #{x[:name]}; \n" end tmptmp = parameters.map { |x| "#{x[:type]} #{x[:name]}"} @@ -142,11 +141,11 @@ def construct_container(name, parameters, given_fields, methods, arraylist_name) fields = "" parameters.each do |x| - fields += "private #{x[:type]} #{x[:name]};" + fields += "private #{x[:type]} #{x[:name]};\n" end given_fields.each do |x| - fields += " private #{x[:type]} #{x[:name]};" + fields += " private #{x[:type]} #{x[:name]};\n" end maggie = methods.map do |x|