lib/request_log_analyzer/request.rb in wvanbergen-request-log-analyzer-1.1.0 vs lib/request_log_analyzer/request.rb in wvanbergen-request-log-analyzer-1.1.1

- old
+ new

@@ -30,13 +30,15 @@ return request end # Adds another line to the request. # The line should be provides as a hash of the fields parsed from the line. - def << (request_info_hash) + def add_parsed_line (request_info_hash) @lines << request_info_hash @attributes = request_info_hash.merge(@attributes) end + + alias :<< :add_parsed_line # Checks whether the given line type was parsed from the log file for this request def has_line_type?(line_type) return true if @lines.length == 1 && @lines[0][:line_type] == line_type.to_sym \ No newline at end of file