Class: StringIO
- Inherits:
-
Object
- Object
- StringIO
- Defined in:
- lib/gibson/gibson.rb
Overview
Define an utility instance method for the String core class.
Instance Method Summary collapse
-
#read_unpacked(size, format) ⇒ Object
Read size bytes and return the first unpacked value given a format.
Instance Method Details
#read_unpacked(size, format) ⇒ Object
Read size bytes and return the first unpacked value given a format.
10 11 12 |
# File 'lib/gibson/gibson.rb', line 10 def read_unpacked size, format read( size ).unpack( format )[0] end |