Method: Mindee.find_platform
- Defined in:
- lib/mindee/version.rb
.find_platform ⇒ Symbol, ...
Finds and return the current platform.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/mindee/version.rb', line 10 def self.find_platform host = RbConfig::CONFIG['host_os'] platforms = { linux: %r{linux|cygwin}, windows: %r{mswin|mingw|bccwin|wince|emx|win32}, macos: %r{mac|darwin}, bsd: %r{bsd}, solaris: %r{solaris|sunos}, } platforms.each do |os, regexp| return os unless (regexp =~ host).nil? end end |