Sha256: bb47208356ed57b3fe93c0bd779c2e15a722632dd3d8291c1b6f8561ebe6901c

Contents?: true

Size: 332 Bytes

Versions: 11

Compression:

Stored size: 332 Bytes

Contents

module Keystone
  module Os
    class Osx < Darwin
      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
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
kanamei-keystone-0.0.18 lib/keystone/os/osx.rb
kanamei-keystone-0.0.19 lib/keystone/os/osx.rb
kanamei-keystone-0.0.20 lib/keystone/os/osx.rb
kanamei-keystone-0.0.21 lib/keystone/os/osx.rb
kanamei-keystone-0.0.22 lib/keystone/os/osx.rb
kanamei-keystone-0.0.23 lib/keystone/os/osx.rb
kanamei-keystone-0.0.24 lib/keystone/os/osx.rb
kanamei-keystone-0.0.25 lib/keystone/os/osx.rb
kanamei-keystone-0.0.26 lib/keystone/os/osx.rb
kanamei-keystone-0.0.27 lib/keystone/os/osx.rb
keystone-0.0.29 lib/keystone/os/osx.rb