Module: Fancybox2::Utils::Os

Extended by:
Os
Included in:
Os
Defined in:
lib/fancybox2/utils/os.rb

Instance Method Summary collapse

Instance Method Details

#identifierObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/fancybox2/utils/os.rb', line 6

def identifier
  return @identifier if @identifier

  host_os = RbConfig::CONFIG['host_os']
  @identifier = case host_os
                when /aix(.+)$/
                  'aix'
                when /darwin(.+)$/
                  'darwin'
                when /linux/
                  'linux'
                when /freebsd(.+)$/
                  'freebsd'
                when /openbsd(.+)$/
                  'openbsd'
                when /netbsd(.*)$/
                  'netbsd'
                when /dragonfly(.*)$/
                  'dragonflybsd'
                when /solaris2/
                  'solaris2'
                when /mswin|mingw32|windows/
                  # No Windows platform exists that was not based on the Windows_NT kernel,
                  # so 'windows' refers to all platforms built upon the Windows_NT kernel and
                  # have access to win32 or win64 subsystems.
                  'windows'
                else
                  host_os
                end
end