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.
171 172 173 174 |
# File 'lib/flow_chat/async_job.rb', line 171 def initialize(content) @content = content @read = false end |
Instance Method Details
#read ⇒ Object
176 177 178 179 180 |
# File 'lib/flow_chat/async_job.rb', line 176 def read return "" if @read @read = true @content end |
#rewind ⇒ Object
182 183 184 |
# File 'lib/flow_chat/async_job.rb', line 182 def rewind @read = false end |