Class: Iface::ValueSet::IpV4Primary
- Defined in:
- lib/iface/value_set/pair.rb
Overview
Represents a pair for IPADDR
Instance Attribute Summary
Attributes inherited from Pair
Instance Method Summary collapse
-
#initialize(_name, value, value_set) ⇒ IpV4Primary
constructor
A new instance of IpV4Primary.
- #value ⇒ Object
- #value=(new_value) ⇒ Object
Methods inherited from Pair
Constructor Details
#initialize(_name, value, value_set) ⇒ IpV4Primary
Returns a new instance of IpV4Primary.
45 46 47 48 |
# File 'lib/iface/value_set/pair.rb', line 45 def initialize(_name, value, value_set) super('IPADDR', value, value_set) self.value = value end |
Instance Method Details
#value ⇒ Object
50 51 52 |
# File 'lib/iface/value_set/pair.rb', line 50 def value IpV4Address.from_numeric(@value).to_s end |
#value=(new_value) ⇒ Object
54 55 56 57 |
# File 'lib/iface/value_set/pair.rb', line 54 def value=(new_value) @value = IpV4Address.new(new_value).to_i self end |