module UserAgent::Browsers::All

def <=>(other)

def <=>(other)
  if respond_to?(:browser) && other.respond_to?(:browser) &&
      browser == other.browser
    version <=> other.version
  else
    false
  end
end

def application

def application
  first
end

def browser

def browser
  application.product
end

def detect_product(product)

def detect_product(product)
  detect { |useragent| useragent.product.to_s.downcase == product.to_s.downcase }
end

def eql?(other)

def eql?(other)
  self == other
end

def method_missing(method, *args, &block)

def method_missing(method, *args, &block)
  detect_product(method) || super
end

def mobile?

def mobile?
  if browser == 'webOS'
    true
  elsif platform == 'Symbian'
    true
  elsif detect_product('Mobile')
    true
  elsif application.comment &&
      application.comment.detect { |k, v| k =~ /^IEMobile/ }
    true
  else
    false
  end
end

def os

def os
  nil
end

def platform

def platform
  nil
end

def respond_to?(symbol)

def respond_to?(symbol)
  detect_product(symbol) ? true : super
end

def to_s

def to_s
  to_str
end

def to_str

def to_str
  join(" ")
end

def version

def version
  application.version
end

def webkit?

def webkit?
  false
end