Class: Webmachine::Streaming::Encoder Private

Inherits:
Object
  • Object
show all
Defined in:
lib/webmachine/streaming/encoder.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Subclasses of this class implement means for streamed/chunked response bodies to be coerced to the negotiated character set and encoded automatically as they are output to the client.

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource, encoder, charsetter, body) ⇒ Encoder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Encoder.

API:

  • private



10
11
12
# File 'lib/webmachine/streaming/encoder.rb', line 10

def initialize(resource, encoder, charsetter, body)
  @resource, @encoder, @charsetter, @body = resource, encoder, charsetter, body
end

Instance Attribute Details

#bodyObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



8
9
10
# File 'lib/webmachine/streaming/encoder.rb', line 8

def body
  @body
end

#charsetterObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



8
9
10
# File 'lib/webmachine/streaming/encoder.rb', line 8

def charsetter
  @charsetter
end

#encoderObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



8
9
10
# File 'lib/webmachine/streaming/encoder.rb', line 8

def encoder
  @encoder
end

#resourceObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



8
9
10
# File 'lib/webmachine/streaming/encoder.rb', line 8

def resource
  @resource
end