Method: Pathname#read_lines
- Defined in:
- lib/pleasant_path/pathname.rb
#read_lines(eol: $/) ⇒ Array<String>
Note:
Not to be confused with Pathname#readlines, which retains end-of-line characters.
Reads all lines from the file indicated by the Pathname, and returns them with eol
(end-of-line) characters stripped.
1033 1034 1035 |
# File 'lib/pleasant_path/pathname.rb', line 1033 def read_lines(eol: $/) self.open("r"){|f| f.read_lines(eol: eol) } end |