Module: RandomReadIO
- Defined in:
- lib/block_cipher_kit/io_types.rb
Overview
Used as a stand-in for any IO-ish that responds to ‘#read`, `#seek`, `#pos` and `#size` This module is defined for YARD docs so that Sorbet has a proper type definition.
Instance Method Summary collapse
-
#pos ⇒ Integer
Current position in the IO.
-
#read(n) ⇒ String?
A String in binary encoding or nil.
- #seek(to_absolute_offset) ⇒ 0
-
#size ⇒ Integer
The total size of the data in the IO.
Instance Method Details
#pos ⇒ Integer
Returns current position in the IO.
24 25 |
# File 'lib/block_cipher_kit/io_types.rb', line 24 def pos end |
#read(n) ⇒ String?
Returns a String in binary encoding or nil.
15 16 |
# File 'lib/block_cipher_kit/io_types.rb', line 15 def read(n) end |
#seek(to_absolute_offset) ⇒ 0
20 21 |
# File 'lib/block_cipher_kit/io_types.rb', line 20 def seek(to_absolute_offset) end |
#size ⇒ Integer
Returns the total size of the data in the IO.
28 29 |
# File 'lib/block_cipher_kit/io_types.rb', line 28 def size end |