Method: Eclair::Instance#hostname

Defined in:
lib/eclair/instance.rb

#hostnameObject



38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/eclair/instance.rb', line 38

def hostname
  case config.ssh_hostname
  when :auto
    if object.network_interfaces.empty? && object.public_ip_address
      object.public_ip_address
    else
      object.private_ip_address
    end
  else
    object.send(config.ssh_hostname)
  end
end