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.
25 26 27 28 29 |
# File 'lib/falcon/proxy_endpoint.rb', line 25 def initialize(endpoint, **) super(**) @endpoint = endpoint end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
35 36 37 |
# File 'lib/falcon/proxy_endpoint.rb', line 35 def endpoint @endpoint end |
Class Method Details
.unix(path, **options) ⇒ Object
65 66 67 |
# File 'lib/falcon/proxy_endpoint.rb', line 65 def self.unix(path, **) self.new(::Async::IO::Endpoint.unix(path), **) end |
Instance Method Details
#authority ⇒ Object
45 46 47 |
# File 'lib/falcon/proxy_endpoint.rb', line 45 def @options[:authority] end |
#bind(&block) ⇒ Object
53 54 55 |
# File 'lib/falcon/proxy_endpoint.rb', line 53 def bind(&block) @endpoint.bind(&block) end |
#connect(&block) ⇒ Object
49 50 51 |
# File 'lib/falcon/proxy_endpoint.rb', line 49 def connect(&block) @endpoint.connect(&block) end |
#each ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/falcon/proxy_endpoint.rb', line 57 def each return to_enum unless block_given? @endpoint.each do |endpoint| yield self.class.new(endpoint, @options) end end |
#protocol ⇒ Object
37 38 39 |
# File 'lib/falcon/proxy_endpoint.rb', line 37 def protocol @options[:protocol] end |
#scheme ⇒ Object
41 42 43 |
# File 'lib/falcon/proxy_endpoint.rb', line 41 def scheme @options[:scheme] end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/falcon/proxy_endpoint.rb', line 31 def to_s "\#<#{self.class} endpoint=#{@endpoint}>" end |