Class: Falcon::ProxyEndpoint
- Inherits:
-
Async::IO::Endpoint
- Object
- Async::IO::Endpoint
- Falcon::ProxyEndpoint
- Defined in:
- lib/falcon/configuration.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
Class Method Summary collapse
Instance Method Summary collapse
- #authority ⇒ Object
- #bind(&block) ⇒ Object
- #connect(&block) ⇒ Object
- #each ⇒ Object
-
#initialize(endpoint, **options) ⇒ ProxyEndpoint
constructor
A new instance of ProxyEndpoint.
- #protocol ⇒ Object
- #scheme ⇒ Object
Constructor Details
#initialize(endpoint, **options) ⇒ ProxyEndpoint
Returns a new instance of ProxyEndpoint.
26 27 28 29 30 |
# File 'lib/falcon/configuration.rb', line 26 def initialize(endpoint, **) super(**) @endpoint = endpoint end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
32 33 34 |
# File 'lib/falcon/configuration.rb', line 32 def endpoint @endpoint end |
Class Method Details
.unix(path, **options) ⇒ Object
62 63 64 |
# File 'lib/falcon/configuration.rb', line 62 def self.unix(path, **) self.new(::Async::IO::Endpoint.unix(path), **) end |
Instance Method Details
#authority ⇒ Object
42 43 44 |
# File 'lib/falcon/configuration.rb', line 42 def @options[:authority] end |
#bind(&block) ⇒ Object
50 51 52 |
# File 'lib/falcon/configuration.rb', line 50 def bind(&block) @endpoint.bind(&block) end |
#connect(&block) ⇒ Object
46 47 48 |
# File 'lib/falcon/configuration.rb', line 46 def connect(&block) @endpoint.connect(&block) end |
#each ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/falcon/configuration.rb', line 54 def each return to_enum unless block_given? @endpoint.each do |endpoint| yield self.class.new(endpoint, @options) end end |
#protocol ⇒ Object
34 35 36 |
# File 'lib/falcon/configuration.rb', line 34 def protocol @options[:protocol] end |
#scheme ⇒ Object
38 39 40 |
# File 'lib/falcon/configuration.rb', line 38 def scheme @options[:scheme] end |