Class: UserAgent::Browsers::Edge

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

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)


4
5
6
# File 'lib/user_agent/browsers/edge.rb', line 4

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

Instance Method Details

#browserObject



8
9
10
# File 'lib/user_agent/browsers/edge.rb', line 8

def browser
  "Edge"
end

#osObject



20
21
22
# File 'lib/user_agent/browsers/edge.rb', line 20

def os
  OperatingSystems.normalize_os(application.comment.join('; ').match(/Windows NT [\d\.]+|Windows Phone (OS )?[\d\.]+/).to_s)
end

#platformObject



16
17
18
# File 'lib/user_agent/browsers/edge.rb', line 16

def platform
  "Windows"
end

#versionObject



12
13
14
# File 'lib/user_agent/browsers/edge.rb', line 12

def version
  last.version
end