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.

Direct Known Subclasses

CallableEncoder, EnumerableEncoder, FiberEncoder, IOEncoder

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Encoder) initialize(resource, encoder, charsetter, body)

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.

A new instance of Encoder


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

- (Object) body

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 the value of attribute body


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

def body
  @body
end

- (Object) charsetter

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 the value of attribute charsetter


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

def charsetter
  @charsetter
end

- (Object) 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 the value of attribute encoder


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

def encoder
  @encoder
end

- (Object) resource

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 the value of attribute resource


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

def resource
  @resource
end