Class: CLIUtils::OpenUrlAction
- Inherits:
-
PrefAction
- Object
- PrefAction
- CLIUtils::OpenUrlAction
- Defined in:
- lib/cliutils/prefs/pref_actions/open_url_action.rb
Overview
Pref Action to open a URL in the default browser.
Instance Attribute Summary
Attributes inherited from PrefAction
Instance Method Summary collapse
-
#run ⇒ void
Runs the action.
Methods included from Messaging
Instance Method Details
#run ⇒ void
This method returns an undefined value.
Runs the action.
9 10 11 12 13 14 |
# File 'lib/cliutils/prefs/pref_actions/open_url_action.rb', line 9 def run url = @parameters[:url] Launchy.open(url) do |exception| fail "Failed to open URL: #{ exception }" if exception end end |