Module: MoreCoreExtensions::StringHexDump
- Defined in:
- lib/more_core_extensions/core_ext/string/hex_dump.rb
Defined Under Namespace
Classes: HexDumper
Instance Method Summary collapse
-
#hex_dump(options = {}) ⇒ Object
Dumps the string in a hex editor style format.
Instance Method Details
#hex_dump(options = {}) ⇒ Object
Dumps the string in a hex editor style format. Options include:
:grouping:: The number of bytes in a line. Default is 16. :newline:: Whether or not to add a \n after each line. Default is true. :start_pos:: The number at which byte counts will start. Default is 0. :obj:: Used in conjunction with :meth to send each line to an object instead of returning as a string. :meth:: Used in conjunction with :obj to send each line to an object instead of returning as a string.
12 13 14 |
# File 'lib/more_core_extensions/core_ext/string/hex_dump.rb', line 12 def hex_dump( = {}) HexDumper.new(self, ).dump end |