Class: Ridley::NodeObject

Inherits:
ChefObject
  • Object
show all
Defined in:
lib/ridley/monkeypatches.rb

Instance Method Summary collapse

Instance Method Details

#public_ipv4Object Also known as: public_ipaddress



15
16
17
18
19
# File 'lib/ridley/monkeypatches.rb', line 15

def public_ipv4
  address = self.cloud? ? self.automatic[:cloud][:public_ipv4] || self.automatic[:ipaddress] : self.automatic[:ipaddress]
  
  address.is_a?(Hash) ? address['ip_address'] : address
end