Class: Vedeu::Distributed::Uri Private
- Inherits:
-
Object
- Object
- Vedeu::Distributed::Uri
- Defined in:
- lib/vedeu/distributed/uri.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Value class which provides the host and port for the DRb server and client.
Instance Attribute Summary collapse
- #host ⇒ String readonly private
- #port ⇒ Fixnum|String readonly private
Instance Method Summary collapse
-
#initialize(host = 'localhost', port = 21_420) ⇒ Vedeu::Distributed::Uri
constructor
private
Returns a new instance of Vedeu::Distributed::Uri.
-
#to_s ⇒ String
(also: #to_str)
private
The host and port as a single value.
Constructor Details
#initialize(host = 'localhost', port = 21_420) ⇒ Vedeu::Distributed::Uri
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Vedeu::Distributed::Uri.
30 31 32 33 |
# File 'lib/vedeu/distributed/uri.rb', line 30 def initialize(host = 'localhost', port = 21_420) @host = host || 'localhost' @port = port || 21_420 end |
Instance Attribute Details
#host ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/vedeu/distributed/uri.rb', line 19 def host @host end |
#port ⇒ Fixnum|String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/vedeu/distributed/uri.rb', line 23 def port @port end |
Instance Method Details
#to_s ⇒ String Also known as: to_str
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The host and port as a single value.
39 40 41 |
# File 'lib/vedeu/distributed/uri.rb', line 39 def to_s "druby://#{host}:#{port}" end |