Class: Construqt::Services::DhcpV6Relay
- Inherits:
-
Object
- Object
- Construqt::Services::DhcpV6Relay
- Defined in:
- lib/construqt/services.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#servers ⇒ Object
Returns the value of attribute servers.
Instance Method Summary collapse
- #add_server(ip) ⇒ Object
-
#initialize(name) ⇒ DhcpV6Relay
constructor
A new instance of DhcpV6Relay.
Constructor Details
#initialize(name) ⇒ DhcpV6Relay
Returns a new instance of DhcpV6Relay.
19 20 21 22 |
# File 'lib/construqt/services.rb', line 19 def initialize(name) self.name = name self.servers = [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
18 19 20 |
# File 'lib/construqt/services.rb', line 18 def name @name end |
#servers ⇒ Object
Returns the value of attribute servers.
18 19 20 |
# File 'lib/construqt/services.rb', line 18 def servers @servers end |
Instance Method Details
#add_server(ip) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/construqt/services.rb', line 23 def add_server(ip) ip = IPAddress.parse(ip) throw "ip must be a v6 address" unless ip.ipv6? self.servers << ip self end |