Class: Falcon::ProxyEndpoint
- Inherits:
-
Async::IO::Endpoint
- Object
- Async::IO::Endpoint
- Falcon::ProxyEndpoint
- Defined in:
- lib/falcon/proxy_endpoint.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
- #to_s ⇒ Object
Constructor Details
#initialize(endpoint, **options) ⇒ ProxyEndpoint
Returns a new instance of ProxyEndpoint.
27 28 29 30 31 |
# File 'lib/falcon/proxy_endpoint.rb', line 27 def initialize(endpoint, **) super(**) @endpoint = endpoint end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
37 38 39 |
# File 'lib/falcon/proxy_endpoint.rb', line 37 def endpoint @endpoint end |
Class Method Details
.unix(path, **options) ⇒ Object
67 68 69 |
# File 'lib/falcon/proxy_endpoint.rb', line 67 def self.unix(path, **) self.new(::Async::IO::Endpoint.unix(path), **) end |
Instance Method Details
#authority ⇒ Object
47 48 49 |
# File 'lib/falcon/proxy_endpoint.rb', line 47 def @options[:authority] end |
#bind(&block) ⇒ Object
55 56 57 |
# File 'lib/falcon/proxy_endpoint.rb', line 55 def bind(&block) @endpoint.bind(&block) end |
#connect(&block) ⇒ Object
51 52 53 |
# File 'lib/falcon/proxy_endpoint.rb', line 51 def connect(&block) @endpoint.connect(&block) end |
#each ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/falcon/proxy_endpoint.rb', line 59 def each return to_enum unless block_given? @endpoint.each do |endpoint| yield self.class.new(endpoint, **@options) end end |
#protocol ⇒ Object
39 40 41 |
# File 'lib/falcon/proxy_endpoint.rb', line 39 def protocol @options[:protocol] end |
#scheme ⇒ Object
43 44 45 |
# File 'lib/falcon/proxy_endpoint.rb', line 43 def scheme @options[:scheme] end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/falcon/proxy_endpoint.rb', line 33 def to_s "\#<#{self.class} endpoint=#{@endpoint}>" end |