Module: PlatformEndLine
- Included in:
- Formats
- Defined in:
- lib/subtitle_it/platform_endl.rb
Instance Method Summary collapse
Instance Method Details
#endline(raw) ⇒ Object
5 6 7 |
# File 'lib/subtitle_it/platform_endl.rb', line 5 def endline( raw ) platform( raw ) == "WIN" ? "\r\n" : "\n" end |
#platform(raw) ⇒ Object
2 3 4 |
# File 'lib/subtitle_it/platform_endl.rb', line 2 def platform( raw ) raw =~ /\r\n/ ? "WIN" : "UNIX" end |