openc3/lib/openc3/io/buffered_file.rb
Method read
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def read(read_length)
if read_length <= (@buffer.length - @buffer_index)
# Return part of the buffer without having to go to the OS
result = @buffer[@buffer_index, read_length]
@buffer_index += read_length
Avoid too many return
statements within this method. Open
Open
return @buffer.slice!(0..-1)
Avoid too many return
statements within this method. Open
Open
return result