Class: Blufin::Network
- Inherits:
-
Object
- Object
- Blufin::Network
- Defined in:
- lib/core/network.rb
Class Method Summary collapse
-
.check_machine_is_online ⇒ Object
Checks if internet connection is present.
Class Method Details
.check_machine_is_online ⇒ Object
Checks if internet connection is present.
9 10 11 12 13 14 15 |
# File 'lib/core/network.rb', line 9 def self.check_machine_is_online begin return true if open('https://www.google.com') rescue Blufin::Terminal::error('No internet connection', 'This script requires an internet connection and your machine is not online.') end end |