lib/packetgen/header/http/headers.rb in packetgen-3.1.4 vs lib/packetgen/header/http/headers.rb in packetgen-3.1.5
- old
+ new
@@ -10,10 +10,12 @@
# @since 2.2.0
module HTTP
# @abstract Base class for HTTP headers.
# @author Kent 'picat' Gruber
class Headers
+ include Inspectable
+
# Underlying Headers data (or nil).
# @return [Hash, nil]
attr_reader :data
alias to_h data
@@ -54,9 +56,10 @@
# Get a human readable string.
# @return [Hash]
def to_human
@data
end
+ alias format_inspect to_human
# Read human-readable data to populate header data.
# @param [String, Hash] data
# @return [self]
def from_human(data)