Class: Keystone::Os::Osx
- Defined in:
- lib/keystone/os/osx.rb
Instance Attribute Summary
Attributes inherited from AbstractOs
Instance Method Summary collapse
Methods inherited from Darwin
Methods inherited from Unix
#bin_or_usrbin, #disk, #hostname, #netstat, #process_list
Methods inherited from AbstractOs
#disk, #dump, #hostname, #netstat, #process_list
Instance Method Details
#ip_address ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/keystone/os/osx.rb', line 5 def ip_address ifconfig = `/sbin/ifconfig` ips = [] # TODO mac ifconfig.gsub(/inet (\d+\.\d+\.\d+\.\d+) netmask/){|ip| if $1 != '127.0.0.1' ips << $1 end } return ips end |