class Lolcommits::CLI::Launcher
Helper class for wrapping the opening of files on the desktop in a cross-platform way.
Right now this is mostly just a wrapper for Launchy, in case we want to factor out it's dependency later or swap it out.
Public Class Methods
open_file(path)
click to toggle source
# File lib/lolcommits/cli/launcher.rb, line 13 def self.open_file(path) open_with_launchy(path) end
open_folder(path)
click to toggle source
# File lib/lolcommits/cli/launcher.rb, line 17 def self.open_folder(path) open_with_launchy(path) end
open_url(url)
click to toggle source
# File lib/lolcommits/cli/launcher.rb, line 21 def self.open_url(url) open_with_launchy(url) end
open_with_launchy(thing)
click to toggle source
Opens with Launchy, which knows how to open pretty much anything local files, urls, etc.
Private so we replace it later easier if we want.
# File lib/lolcommits/cli/launcher.rb, line 29 def self.open_with_launchy(thing) Launchy.open(thing) end