Class: Disloku::OsCommands
- Inherits:
-
Object
- Object
- Disloku::OsCommands
- Defined in:
- lib/disloku/OsCommands.rb
Constant Summary collapse
- @@os =
(RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/ ? :win : :unix)
- @@commands =
{ :openDir => { :win => "explorer \"$1\"", :unix => "xdg-open \"$1\"", } }
Class Method Summary collapse
Class Method Details
.convertPath(path) ⇒ Object
22 23 24 |
# File 'lib/disloku/OsCommands.rb', line 22 def convertPath(path) return @@os == :win ? path.gsub(File::SEPARATOR, File::ALT_SEPARATOR) : path end |