Module: Jekyll::Utils::Platforms
Instance Method Summary collapse
- #bash_on_windows? ⇒ Boolean
- #linux? ⇒ Boolean
-
#vanilla_windows? ⇒ Boolean
(also: #really_windows?)
– Allows you to detect “real” Windows, or what we would consider “real” Windows.
- #windows? ⇒ Boolean
Instance Method Details
#bash_on_windows? ⇒ Boolean
38 39 40 41 |
# File 'lib/jekyll/utils/platforms.rb', line 38 def bash_on_windows? RbConfig::CONFIG["host_os"] =~ %r!linux! && \ proc_version =~ %r!microsoft!i end |
#linux? ⇒ Boolean
51 52 53 54 |
# File 'lib/jekyll/utils/platforms.rb', line 51 def linux? RbConfig::CONFIG["host_os"] =~ %r!linux! && \ proc_version !~ %r!microsoft!i end |
#vanilla_windows? ⇒ Boolean Also known as: really_windows?
– Allows you to detect “real” Windows, or what we would consider “real” Windows. That is, that we can pass the basic test and the /proc/version returns nothing to us. –
24 25 26 27 |
# File 'lib/jekyll/utils/platforms.rb', line 24 def vanilla_windows? RbConfig::CONFIG["host_os"] =~ %r!mswin|mingw|cygwin!i && \ !proc_version end |
#windows? ⇒ Boolean
45 46 47 |
# File 'lib/jekyll/utils/platforms.rb', line 45 def windows? vanilla_windows? || bash_on_windows? end |