Sha256: 9e7980b6b56e0c8b3157a46cd0e227595e1cc952a65301b2d825cb82da93f204
Contents?: true
Size: 935 Bytes
Versions: 1
Compression:
Stored size: 935 Bytes
Contents
module Vedeu module Distributed # Value class which provides the host and port for the DRb server and # client. # # @api private class Uri # @!attribute [r] host # @return [String] attr_reader :host # @!attribute [r] port # @return [Fixnum|String] attr_reader :port # Returns a new instance of Vedeu::Distributed::Uri. # # @param host [String] Hostname or IP address. # @param port [Fixnum|String] # @return [Vedeu::Distributed::Uri] def initialize(host = 'localhost', port = 21_420) @host = host || 'localhost' @port = port || 21_420 end # @example # 'druby://localhost:21420' # # @return [String] The host and port as a single value. def to_s ['druby://', host, ':', port].join end alias_method :to_str, :to_s end # Uri end # Distributed end # Vedeu
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vedeu-0.4.56 | lib/vedeu/distributed/uri.rb |