Class: Hiredis::Ruby::Reader
- Inherits:
-
Object
- Object
- Hiredis::Ruby::Reader
- Defined in:
- lib/hiredis/ruby/reader.rb
Defined Under Namespace
Instance Method Summary collapse
- #feed(data) ⇒ Object
- #gets ⇒ Object
-
#initialize ⇒ Reader
constructor
A new instance of Reader.
Constructor Details
Instance Method Details
#feed(data) ⇒ Object
12 13 14 |
# File 'lib/hiredis/ruby/reader.rb', line 12 def feed(data) @buffer << data end |
#gets ⇒ Object
16 17 18 19 20 |
# File 'lib/hiredis/ruby/reader.rb', line 16 def gets reply = @task.process @buffer.discard! reply end |