Class: Lib::BOOTP::Packet::IPAddress
- Inherits:
-
Net::Address::IPv4
- Object
- Net::Address::IPv4
- Lib::BOOTP::Packet::IPAddress
- Defined in:
- lib/lib/bootp/packet/ip_address.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.unpack(ip) ⇒ Object
18 19 20 |
# File 'lib/lib/bootp/packet/ip_address.rb', line 18 def self.unpack(ip) new ip.to_s.unpack('N').first.to_i end |
Instance Method Details
#pack ⇒ Object
14 15 16 |
# File 'lib/lib/bootp/packet/ip_address.rb', line 14 def pack [self.to_i].pack('N') end |