class Webmachine::Streaming::CallableEncoder
Implements a streaming encoder for callable bodies, such as Proc. (essentially futures) @api private
Public Instance Methods
call()
click to toggle source
Encodes the output of the body Proc. @return [String]
# File lib/webmachine/streaming/callable_encoder.rb, line 9 def call resource.send(encoder, resource.send(charsetter, body.call.to_s)) end
to_proc()
click to toggle source
Converts this encoder into a Proc. @return [Proc] a closure that wraps the {#call} method @see call
# File lib/webmachine/streaming/callable_encoder.rb, line 16 def to_proc method(:call).to_proc end