Class: Bjt::Browser
- Inherits:
-
Object
- Object
- Bjt::Browser
- Defined in:
- lib/bjt/browser.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url) ⇒ Browser
constructor
A new instance of Browser.
- #open ⇒ Object
Constructor Details
#initialize(url) ⇒ Browser
Returns a new instance of Browser.
7 8 9 |
# File 'lib/bjt/browser.rb', line 7 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/bjt/browser.rb', line 5 def url @url end |
Instance Method Details
#open ⇒ Object
11 12 13 14 15 |
# File 'lib/bjt/browser.rb', line 11 def open Launchy.open(url) do |exception| puts "Attempted to open '#{url}' and failed because #{exception}" end end |