Module: Localhost::System
- Defined in:
- lib/localhost/system.rb,
lib/localhost/system/linux.rb,
lib/localhost/system/darwin.rb
Defined Under Namespace
Class Method Summary collapse
-
.current ⇒ Class
The best system class for the current platform.
Class Method Details
.current ⇒ Class
Returns The best system class for the current platform.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/localhost/system.rb', line 10 def self.current case RUBY_PLATFORM when /darwin/ require "localhost/system/darwin" Darwin when /linux/ require "localhost/system/linux" Linux else raise NotImplementedError, "Unsupported platform: #{RUBY_PLATFORM}" end end |