Class: Airplay::CLI::Doctor::DebugDevice

Inherits:
Struct
  • Object
show all
Defined in:
lib/airplay/cli/doctor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nodeObject

Returns the value of attribute node

Returns:

  • (Object)

    the current value of node



4
5
6
# File 'lib/airplay/cli/doctor.rb', line 4

def node
  @node
end

#resolvedObject

Returns the value of attribute resolved

Returns:

  • (Object)

    the current value of resolved



4
5
6
# File 'lib/airplay/cli/doctor.rb', line 4

def resolved
  @resolved
end

Instance Method Details

#hostObject



5
6
7
8
9
10
# File 'lib/airplay/cli/doctor.rb', line 5

def host
  info = Socket.getaddrinfo(resolved.target, nil, Socket::AF_INET)
  info[0][2]
rescue SocketError
  target
end