Module: ChupakabraTools::Http
- Defined in:
- lib/chupakabra_tools/http.rb
Class Method Summary collapse
Class Method Details
.retrieve_operating_system(user_agent) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/chupakabra_tools/http.rb', line 3 def self.(user_agent) unless user_agent "Unknown" end if user_agent.downcase.match(/mac/i) "MacOS" elsif user_agent.downcase.match(/windows/i) "Windows" elsif user_agent.downcase.match(/linux/i) "Linux" elsif user_agent.downcase.match(/unix/i) "Unix" else "Unknown" end end |