lib/bindata/base.rb in bindata-2.1.0 vs lib/bindata/base.rb in bindata-2.2.0
- old
+ new
@@ -180,9 +180,14 @@
write(io)
io.rewind
io.read
end
+ # Returns the hexadecimal string representation of this data object.
+ def to_hex
+ to_binary_s.unpack('H*')[0]
+ end
+
# Return a human readable representation of this data object.
def inspect
snapshot.inspect
end