Class: IpAddress
- Inherits:
-
BinData::Primitive
- Object
- BinData::Primitive
- IpAddress
- Defined in:
- lib/helpers/ip_address.rb
Instance Method Summary collapse
Instance Method Details
#get ⇒ Object
7 8 9 |
# File 'lib/helpers/ip_address.rb', line 7 def get octets.map(&:to_s).join('.') end |
#set(value) ⇒ Object
11 12 13 |
# File 'lib/helpers/ip_address.rb', line 11 def set(value) self.octets = value.split('.').map(&:to_i) end |