Class: IpMapping
- Inherits:
-
Object
- Object
- IpMapping
- Defined in:
- lib/secured_cloud_api_client/ip_mapping.rb
Overview
A mapping between a set of public IPs and a private IP.
- @author
-
Alan Vella
Instance Method Summary collapse
- #get_details ⇒ Object
- #get_public_ips ⇒ Object
-
#initialize(privateIp, publicIps) ⇒ IpMapping
constructor
A new instance of IpMapping.
Constructor Details
#initialize(privateIp, publicIps) ⇒ IpMapping
Returns a new instance of IpMapping.
11 12 13 14 |
# File 'lib/secured_cloud_api_client/ip_mapping.rb', line 11 def initialize(privateIp, publicIps) @privateIp = privateIp @publicIps = publicIps end |
Instance Method Details
#get_details ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/secured_cloud_api_client/ip_mapping.rb', line 17 def get_details() s = "" if (@publicIps == nil) then s = " Public IPs [ - ] => " else s = " Public IPs [" + @publicIps.join(", ") + "] => " end s += " Private IP [" + @privateIp + "]" return s end |
#get_public_ips ⇒ Object
29 30 31 |
# File 'lib/secured_cloud_api_client/ip_mapping.rb', line 29 def get_public_ips() return @publicIps end |