lib/nanoc/cli/cleaning_stream.rb in nanoc-4.8.19 vs lib/nanoc/cli/cleaning_stream.rb in nanoc-4.9.0

- old
+ new

@@ -38,20 +38,20 @@ end # @group IO proxy methods # @see IO#write - def write(s) + def write(str) _nanoc_swallow_broken_pipe_errors_while do - @stream.write(_nanoc_clean(s)) + @stream.write(_nanoc_clean(str)) end end # @see IO#<< - def <<(s) + def <<(str) _nanoc_swallow_broken_pipe_errors_while do - @stream.<<(_nanoc_clean(s)) + @stream.<<(_nanoc_clean(str)) end end # @see IO#tty? def tty? @@ -74,31 +74,31 @@ def tell @stream.tell end # @see IO#print - def print(s) + def print(str) _nanoc_swallow_broken_pipe_errors_while do - @stream.print(_nanoc_clean(s)) + @stream.print(_nanoc_clean(str)) end end # @see IO#puts - def puts(*s) + def puts(*str) _nanoc_swallow_broken_pipe_errors_while do - @stream.puts(*s.map { |ss| _nanoc_clean(ss) }) + @stream.puts(*str.map { |ss| _nanoc_clean(ss) }) end end # @see StringIO#string def string @stream.string end # @see IO#reopen - def reopen(*a) - @stream.reopen(*a) + def reopen(*args) + @stream.reopen(*args) end # @see IO#close def close @stream.close @@ -146,11 +146,11 @@ end # rubocop:enable Naming/AccessorMethodName protected - def _nanoc_clean(s) - @stream_cleaners.reduce(s.to_s.scrub) { |acc, elem| elem.clean(acc) } + def _nanoc_clean(str) + @stream_cleaners.reduce(str.to_s.scrub) { |acc, elem| elem.clean(acc) } end def _nanoc_swallow_broken_pipe_errors_while yield rescue Errno::EPIPE