Sha256: e2e7e9e2dd5e20cb6b958729b40cc78a513ffba25df5789895914cacabc2fa9a
Contents?: true
Size: 410 Bytes
Versions: 35
Compression:
Stored size: 410 Bytes
Contents
module TerminalCommands def self.open_file_or_link(file_or_link, options = {}) command = if macosx? "open" elsif linux? "xdg-open" end `#{command} #{file_or_link}` end def self.os Gem::Platform.local.os end def self.macosx? os == macosx end def self.linux? os == linux end def self.macosx "darwin" end def self.linux "linux" end end
Version data entries
35 entries across 35 versions & 1 rubygems