Class: Laptop
- Inherits:
-
Object
- Object
- Laptop
- Defined in:
- lib/laptop.rb
Class Method Summary collapse
Class Method Details
.get_ip_address ⇒ Object
3 4 5 6 |
# File 'lib/laptop.rb', line 3 def self.get_ip_address ip_address = `ifconfig | awk '/inet / {print $2}'` ip_address.strip # Remove leading/trailing whitespace end |
.ip ⇒ Object
8 9 10 |
# File 'lib/laptop.rb', line 8 def self.ip puts self.get_ip_address end |