Class: UserAgent::Browsers::Edge

Inherits:
Base
  • Object
show all
Defined in:
lib/user_agent/browsers/edge.rb

Constant Summary collapse

OS_REGEXP =
/Windows NT [\d\.]+|Windows Phone (OS )?[\d\.]+/

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#<=>, #application, #bot?, #eql?, #method_missing, #mobile?, #respond_to?, #to_h, #to_s, #to_str

Methods included from Comparable

#<, #<=, #==, #>, #>=

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class UserAgent::Browsers::Base

Class Method Details

.extend?(agent) ⇒ Boolean

Returns:

  • (Boolean)

6
7
8
# File 'lib/user_agent/browsers/edge.rb', line 6

def self.extend?(agent)
  agent.last && agent.last.product == "Edge"
end

Instance Method Details

#browserObject


10
11
12
# File 'lib/user_agent/browsers/edge.rb', line 10

def browser
  "Edge"
end

#osObject


22
23
24
# File 'lib/user_agent/browsers/edge.rb', line 22

def os
  OperatingSystems.normalize_os(os_comment)
end

#platformObject


18
19
20
# File 'lib/user_agent/browsers/edge.rb', line 18

def platform
  "Windows"
end

#versionObject


14
15
16
# File 'lib/user_agent/browsers/edge.rb', line 14

def version
  last.version
end