lib/request_log_analyzer/request.rb in wvanbergen-request-log-analyzer-1.2.0 vs lib/request_log_analyzer/request.rb in wvanbergen-request-log-analyzer-1.2.1

- old
+ new

@@ -58,12 +58,12 @@ attr_reader :lines attr_reader :attributes # Initializes a new Request object. # It will apply the the provided FileFormat module to this instance. - def initialize(file_format) + def initialize(file_format, attributes = {}) @lines = [] - @attributes = {} + @attributes = attributes register_file_format(file_format) end # Creates a new request that was parsed from the log with the given FileFormat. The hashes # that are passed to this function are added as lines to this request. \ No newline at end of file