Class: FlowChat::BackgroundRequestBody
- Inherits:
-
Object
- Object
- FlowChat::BackgroundRequestBody
- Defined in:
- lib/flow_chat/async_job.rb
Overview
Body wrapper for BackgroundRequest Provides read() method that Rails expects
Instance Method Summary collapse
-
#initialize(content) ⇒ BackgroundRequestBody
constructor
A new instance of BackgroundRequestBody.
- #read ⇒ Object
- #rewind ⇒ Object
Constructor Details
#initialize(content) ⇒ BackgroundRequestBody
Returns a new instance of BackgroundRequestBody.
161 162 163 164 |
# File 'lib/flow_chat/async_job.rb', line 161 def initialize(content) @content = content @read = false end |
Instance Method Details
#read ⇒ Object
166 167 168 169 170 |
# File 'lib/flow_chat/async_job.rb', line 166 def read return "" if @read @read = true @content end |
#rewind ⇒ Object
172 173 174 |
# File 'lib/flow_chat/async_job.rb', line 172 def rewind @read = false end |