module Aua::Agents::Opera

Constants

PATTERN
PATTERN_MINI
PATTERN_MOBILE

Public Class Methods

extend?(agent) click to toggle source
# File lib/aua/agents/opera.rb, line 2
def self.extend?(agent)
  agent.products.include?("Opera")
end

Public Instance Methods

name() click to toggle source
# File lib/aua/agents/opera.rb, line 14
def name
  @name ||= begin
    return :OperaMobile if app_comments_string =~ PATTERN_MOBILE
    return :OperaMini if app_comments_string =~ PATTERN_MINI
    :Opera
  end
end
type() click to toggle source
# File lib/aua/agents/opera.rb, line 10
def type
  :Browser
end
version() click to toggle source
# File lib/aua/agents/opera.rb, line 22
def version
  @version ||= begin
    return $1 if app_comments[1] =~ PATTERN_MINI
    (raw =~ PATTERN && $1) || version_of("Version") || version_of("Opera")
  end
end