Class: Civo::Instance

Inherits:
Base
  • Object
show all
Defined in:
app/models/civo/instance.rb

Instance Method Summary collapse

Instance Method Details

#nice_ip_addressesObject



30
31
32
33
34
35
36
37
38
# File 'app/models/civo/instance.rb', line 30

def nice_ip_addresses
  @ip_addresses ||= (self._attributes[:ip_addresses].items rescue []).map do |ip|
    if ip.public_ip
      "#{ip.private_ip}=>#{ip.public_ip}"
    else
      "#{ip.private_ip}"
    end
  end.join(", ")
end

#to_partial_pathObject



40
41
42
# File 'app/models/civo/instance.rb', line 40

def to_partial_path
  "civo/instance"
end