lib/forgery/file_reader.rb
# Reads file from a folder and returns array of content lines.
# Strips leading and trailing whitespace, including newlines.
Reads file from a folder and returns array of content lines.
Strips leading and trailing whitespace, including newlines.
Reads file from a folder and returns array of content lines . Strips leading and trailing whitespace including newlines .
def read_file(file)
      lines = []
      IO.foreach(find(file)) do |line|
        lines << line.strip unless line.strip == ''
      end
      lines
    end
def read_file ( file ) lines = [ ] IO . foreach ( find ( file ) ) do | line | lines << line . strip unless line . strip == '' end lines end
Reads file from a folder and returns array of content lines.
Reads file from a folder and returns array of content lines .
file
<not_specific>