File: surface.rb

package info (click to toggle)
ruby-browser 6.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 900 kB
  • sloc: ruby: 4,845; makefile: 13
file content (23 lines) | stat: -rw-r--r-- 356 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module Browser
  class Device
    class Surface < Base
      def id
        :surface
      end

      def name
        "Microsoft Surface"
      end

      def match?
        platform.windows_rt? && ua.include?("Touch")
      end

      private def platform
        @platform ||= Platform.new(ua)
      end
    end
  end
end