Module: Ftpd::AsciiHelper
- Included in:
- CommandHandler
- Defined in:
- lib/ftpd/ascii_helper.rb
Instance Method Summary collapse
Instance Method Details
#nvt_ascii_to_unix(s) ⇒ Object
10 11 12 |
# File 'lib/ftpd/ascii_helper.rb', line 10 def nvt_ascii_to_unix(s) s.gsub(/\r\n/, "\n") end |
#unix_to_nvt_ascii(s) ⇒ Object
5 6 7 8 |
# File 'lib/ftpd/ascii_helper.rb', line 5 def unix_to_nvt_ascii(s) return s if s =~ /\r\n/ s.gsub(/\n/, "\r\n") end |