| Conditions | 4 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | 1 | require "tmpdir" |
|
| 23 | 1 | def open_document(filename) |
|
| 24 | 4 | case RUBY_PLATFORM |
|
| 25 | when /darwin/ |
||
| 26 | 1 | system("open", filename) |
|
| 27 | when /linux/ |
||
| 28 | 1 | system("xdg-open", filename) |
|
| 29 | when /windows/ |
||
| 30 | 1 | system("cmd", "/c", "\"start #{filename}\"") |
|
| 31 | else |
||
| 32 | 1 | Output.warning(:dont_know_how_to_open_resume) |
|
| 33 | end |
||
| 34 | end |
||
| 35 | |||
| 49 |