Class: Firebug::StringIOReader
- Inherits:
-
StringIO
- Object
- StringIO
- Firebug::StringIOReader
- Defined in:
- lib/firebug/string_io_reader.rb
Instance Method Summary collapse
-
#read_until(char, include: true) ⇒ String?
Reads data from the buffer until
charis found.
Instance Method Details
#read_until(char, include: true) ⇒ String?
Reads data from the buffer until char is found.
10 11 12 13 14 |
# File 'lib/firebug/string_io_reader.rb', line 10 def read_until(char, include: true) if (idx = string.index(char, pos)) # rubocop:disable Style/GuardClause read(idx - pos + (include ? 1 : 0)) end end |