Module: LicenseFinder::Platform
- Defined in:
- lib/license_finder/platform.rb
Class Method Summary collapse
Class Method Details
.darwin? ⇒ Boolean
3 4 5 |
# File 'lib/license_finder/platform.rb', line 3 def self.darwin? RUBY_PLATFORM =~ /darwin/ end |
.windows? ⇒ Boolean
7 8 9 10 11 |
# File 'lib/license_finder/platform.rb', line 7 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 |