Class: Capistrano::Cable::Bind
- Inherits:
-
Struct
- Object
- Struct
- Capistrano::Cable::Bind
- Defined in:
- lib/capistrano/cable/bind.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#full_address ⇒ Object
Returns the value of attribute full_address.
-
#kind ⇒ Object
Returns the value of attribute kind.
Instance Method Summary collapse
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address
3 4 5 |
# File 'lib/capistrano/cable/bind.rb', line 3 def address @address end |
#full_address ⇒ Object
Returns the value of attribute full_address
3 4 5 |
# File 'lib/capistrano/cable/bind.rb', line 3 def full_address @full_address end |
#kind ⇒ Object
Returns the value of attribute kind
3 4 5 |
# File 'lib/capistrano/cable/bind.rb', line 3 def kind @kind end |
Instance Method Details
#local ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/capistrano/cable/bind.rb', line 16 def local if unix? self else self.class.new( localize_address(full_address), kind, localize_address(address) ) end end |
#ssl? ⇒ Boolean
8 9 10 |
# File 'lib/capistrano/cable/bind.rb', line 8 def ssl? kind == :ssl end |
#tcp ⇒ Object
12 13 14 |
# File 'lib/capistrano/cable/bind.rb', line 12 def tcp kind == :tcp || ssl? end |
#unix? ⇒ Boolean
4 5 6 |
# File 'lib/capistrano/cable/bind.rb', line 4 def unix? kind == :unix end |