Class: Browserinfo::binfo
- Inherits:
-
Object
- Object
- Browserinfo::binfo
- Defined in:
- lib/browserinfo.rb
Overview
Your code goes here…
Instance Method Summary collapse
Instance Method Details
#process(info) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/browserinfo.rb', line 7 def process(info) content = Hash.new if info.include?("Chrome") content[:browser] = 'Chrome' elsif info.include?("Firefox") content[:browser] = 'Firefox' elsif info.include?("Safari") content[:browser] = 'Safari' elsif info.include?("Explorer") content[:browser] = 'Internet Explorer' else content[:browser] = 'Not recognized' end end |