Skip to content

Commit b67f6cd

Browse files
committed
Expose attributes.
1 parent 2e145fe commit b67f6cd

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

lib/async/http/compressor.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,19 @@ module HTTP
2929
class Compressor
3030
def initialize(client, window_size = Body::Deflate::GZIP, level = Body::Deflate::DEFAULT_LEVEL)
3131
@client = client
32-
3332
@window_size = window_size
3433
@level = level
3534
end
3635

36+
# The client which will be used for requests.
37+
attr :client
38+
39+
# The compression window size.
40+
attr :window_size
41+
42+
# The compression level.
43+
attr :level
44+
3745
def close
3846
@client.close
3947
end

lib/async/http/redirector.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ def initialize(client, maximum_hops = 8)
3434
}
3535
end
3636

37+
# The client which will be used for requests
38+
attr :client
39+
40+
# The maximum number of hops which will limit the number of redirects until an error is thrown.
41+
attr :maximum_hops
42+
43+
# Any other clients which were connected to service redirects.
44+
attr :clients
45+
3746
def close
3847
@clients.each_value(&:close)
3948
@clients.clear

0 commit comments

Comments
 (0)