Method: ActionController::Live::Buffer#writeln

Defined in:
actionpack/lib/action_controller/metal/live.rb

#writeln(string) ⇒ Object

Same as write but automatically include a newline at the end of the string.



200
201
202
# File 'actionpack/lib/action_controller/metal/live.rb', line 200

def writeln(string)
  write string.end_with?("\n") ? string : "#{string}\n"
end