lib/pleasant_path/enumerable.rb in pleasant_path-1.3.0 vs lib/pleasant_path/enumerable.rb in pleasant_path-2.0.0
- old
+ new
@@ -1,11 +1,11 @@
module Enumerable
- # Writes each object in the Enumerable as a string plus end-of-line
- # (EOL) characters to the specified +file+, overwriting the file if it
- # exists. Creates the file if it does not exist, including any
- # necessary parent directories. Returns the Enumerable.
+ # Writes each object in the Enumerable as a string plus +eol+
+ # (end-of-line) characters to the specified +file+, overwriting the
+ # file if it exists. Creates the file if it does not exist, including
+ # any necessary parent directories. Returns the Enumerable.
#
# @see Pathname#write_lines
#
# @example
# [:one, :two].write_to_file("out.txt") # == [:one, :two]
@@ -17,13 +17,13 @@
def write_to_file(file, eol: $/)
file.to_pathname.write_lines(self, eol: eol)
self
end
- # Appends each object in the Enumerable as a string plus end-of-line
- # (EOL) characters to the specified +file+. Creates the file if it
- # does not exist, including any necessary parent directories. Returns
- # the Enumerable.
+ # Appends each object in the Enumerable as a string plus +eol+
+ # (end-of-line) characters to the specified +file+. Creates the file
+ # if it does not exist, including any necessary parent directories.
+ # Returns the Enumerable.
#
# @see Pathname#append_lines
#
# @example
# [:one, :two].append_to_file("out.txt") # == [:one, :two]