Class: Async::HTTP::Protocol::Configured

Inherits:
Object
  • Object
show all
Defined in:
lib/async/http/protocol/configurable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(protocol, **options) ⇒ Configured

Returns a new instance of Configured.

[View source]

10
11
12
13
# File 'lib/async/http/protocol/configurable.rb', line 10

def initialize(protocol, **options)
	@protocol = protocol
	@options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.


19
20
21
# File 'lib/async/http/protocol/configurable.rb', line 19

def options
  @options
end

#protocolObject (readonly)

Returns the value of attribute protocol.


16
17
18
# File 'lib/async/http/protocol/configurable.rb', line 16

def protocol
  @protocol
end

#The underlying protocol.(underlyingprotocol.) ⇒ Object (readonly)


16
# File 'lib/async/http/protocol/configurable.rb', line 16

attr :protocol

Instance Method Details

#client(peer, **options) ⇒ Object

[View source]

21
22
23
24
# File 'lib/async/http/protocol/configurable.rb', line 21

def client(peer, **options)
	options = @options.merge(options)
	@protocol.client(peer, **options)
end

#namesObject

[View source]

31
32
33
# File 'lib/async/http/protocol/configurable.rb', line 31

def names
	@protocol.names
end

#server(peer, **options) ⇒ Object

[View source]

26
27
28
29
# File 'lib/async/http/protocol/configurable.rb', line 26

def server(peer, **options)
	options = @options.merge(options)
	@protocol.server(peer, **options)
end

#The options to pass to the protocol.=(optionstopasstotheprotocol. = (value)) ⇒ Object

[View source]

19
# File 'lib/async/http/protocol/configurable.rb', line 19

attr :options