Method: Geet::Helpers::OsHelper#open_file_with_default_application

Defined in:
lib/geet/helpers/os_helper.rb

#open_file_with_default_application(file_or_url) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/geet/helpers/os_helper.rb', line 10

def open_file_with_default_application(file_or_url)
  if `uname`.strip == 'Darwin'
    exec "open #{file_or_url.shellescape}"
  else
    exec "xdg-open #{file_or_url.shellescape}"
  end
end