Class: Airplay::CLI::Doctor

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

Defined Under Namespace

Classes: DebugDevice

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDoctor

Returns a new instance of Doctor.



15
16
17
# File 'lib/airplay/cli/doctor.rb', line 15

def initialize
  @devices = []
end

Instance Attribute Details

#devicesObject

Returns the value of attribute devices.



13
14
15
# File 'lib/airplay/cli/doctor.rb', line 13

def devices
  @devices
end

Instance Method Details

#informationObject



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/airplay/cli/doctor.rb', line 19

def information
  find_devices!

  devices.each do |device|
    puts <<-EOS.gsub!(" "*12, "")
      Name: #{device.node.name}
      Host: #{device.host}
      Port: #{device.resolved.port}
      Full Name: #{device.node.fullname}
      Iface: #{device.node.interface_name}
      TXT: #{device.resolved.text_record}

    EOS
  end
end