Module: LicenseFinder::Platform
- Defined in:
- lib/license_finder/platform.rb
Class Method Summary collapse
Class Method Details
.darwin? ⇒ Boolean
5 6 7 |
# File 'lib/license_finder/platform.rb', line 5 def self.darwin? RUBY_PLATFORM =~ /darwin/ end |
.windows? ⇒ Boolean
9 10 11 12 13 |
# File 'lib/license_finder/platform.rb', line 9 def self.windows? # SO: What is the correct way to detect if ruby is running on Windows?, # cf. https://stackoverflow.com/a/21468976/2592915 Gem.win_platform? || RUBY_PLATFORM =~ /mswin|cygwin|mingw/ end |