Class: BinaryParser::BuiltInTemplate::Binary
- Inherits:
-
TemplateBase
- Object
- TemplateBase
- BinaryParser::BuiltInTemplate::Binary
- Defined in:
- lib/built_in_template/binary.rb
Instance Method Summary collapse
Methods inherited from TemplateBase
Def, #[], #binary_bit_length, #convert_into_abstract_binary, def_structure, #hold_enough_binary?, #hold_just_binary?, #initialize, #method_missing, #names, #show, structure, #structure_bit_length, #to_chars, #to_i, #to_s
Constructor Details
This class inherits a constructor from BinaryParser::TemplateBase
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BinaryParser::TemplateBase
Instance Method Details
#content_description ⇒ Object
4 5 6 7 8 |
# File 'lib/built_in_template/binary.rb', line 4 def content_description chars = to_chars bytes = chars[0, 5].map{|i| sprintf("0x%02x", i)}.join(", ") return "[" + bytes + (chars.length > 5 ? ", ..." : "") + "]" end |