Method: Dnsruby::RR::IPSECKEY#load_gateway_from_string
- Defined in:
- lib/dnsruby/resource/IPSECKEY.rb
#load_gateway_from_string(gateway_type, s) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/dnsruby/resource/IPSECKEY.rb', line 61 def load_gateway_from_string(gateway_type, s) gateway = nil if (gateway_type == 0) gateway = nil elsif (gateway_type == 1) # Load IPv4 gateway gateway = IPv4.create(s) elsif (gateway_type == 2) # Load IPv6 gateway gateway = IPv6.create(s) else # Load gateway domain name gateway = Name.create(s) end return gateway end |