Sha256: 329394369b634bbd1512a5efb2515890485299e80ff012bbfebde021321eb07e

Contents?: true

Size: 468 Bytes

Versions: 23

Compression:

Stored size: 468 Bytes

Contents

require 'win32/registry'

class BrowserFinder
  
  def initialize
    @ie = '"C:/Program Files/Internet Explorer/iexplore.exe" "%1"'
  end
  
  def getDefault
    browser = getBrowserFromRegistry()
    return browser != '' ? browser : @ie
  end
  
  def getBrowserFromRegistry
    
      Win32::Registry::HKEY_CLASSES_ROOT.open('http\shell\open\command') do |reg|
          reg_typ, reg_val = reg.read('')          
          return reg_val
      end
    
  end
  
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
loris-0.5.2 lib/browser_finder.rb
loris-0.5.1 lib/browser_finder.rb
loris-0.5.0 lib/browser_finder.rb
loris-0.4.1 lib/browser_finder.rb
loris-0.4.0 lib/browser_finder.rb
loris-0.3.2 lib/browser_finder.rb
loris-0.3.1 lib/browser_finder.rb
loris-0.3.0 lib/browser_finder.rb
loris-0.2.3 lib/browser_finder.rb
loris-0.2.2 lib/browser_finder.rb
loris-0.2.1 lib/browser_finder.rb
loris-0.2.0 lib/browser_finder.rb
loris-0.1.7 lib/browser_finder.rb
loris-0.1.5 lib/browser_finder.rb
loris-0.1.4 lib/browser_finder.rb
loris-0.1.3 lib/browser_finder.rb
loris-0.1.2 lib/browser_finder.rb
loris-0.1.1 lib/browser_finder.rb
loris-0.1.0 lib/browser_finder.rb
loris-0.0.16 lib/browser_finder.rb