Minor changes for comment issues

This commit is contained in:
Hannah-Dagemark 2023-12-04 08:56:18 +01:00
commit b797a282f5
4 changed files with 11 additions and 13 deletions

View file

@ -3,15 +3,12 @@ class Request
def initialize(input)
@input = input
@method = ""
@resource = ""
@version = ""
@headers = []
@params = []
deconstructor(@input)
variable_definer(@input)
end
def deconstructor(input)
private
def variable_definer(input) ##Defines required class variables by splitting up the input text
rows = input.split(/\n/)
@method, @resource, @version = rows[0].split(' ')
@headers, @params = {}, {}
@ -28,6 +25,7 @@ class Request
resource_deconstructor
end
end
def header_constructor(rows, limit)
for row in rows[1..limit-1]
context, information = row.split(' ')