lib/packetgen/header/dhcpv6/duid.rb in packetgen-2.6.0 vs lib/packetgen/header/dhcpv6/duid.rb in packetgen-2.7.0

- old
+ new

@@ -9,16 +9,15 @@ module Header class DHCPv6 # @abstract Base class for DUID (DHCP Unique ID) # @author Sylvain Daubert class DUID < Types::Fields - TYPES = { 'DUID-LLT' => 1, 'DUID-EN' => 2, 'DUID-LL' => 3 - } + }.freeze # @!attribute type # 16-bit DUID type # @return [Integer] define_field :type, Types::Int16Enum, enum: TYPES @@ -115,10 +114,10 @@ define_field :identifier, Types::String # Get human-readable DUID description # @return [String] def to_human - "DUID_EN<%#x,%s>" % [en, identifier] + 'DUID_EN<%#x,%s>' % [en, identifier] end end # DUID Based on Link-layer # @author Sylvain Daubert