lib/artoo/connection.rb in artoo-1.0.0.pre vs lib/artoo/connection.rb in artoo-1.0.0.rc1

- old
+ new

@@ -11,15 +11,16 @@ attr_reader :parent, :name, :port, :adaptor, :connection_id # Create new connection # @param [Hash] params + # @option params :id [String] # @option params :name [String] # @option params :parent [String] # @option params :adaptor [String] # @option params :port [Integer] def initialize(params={}) - @connection_id = rand(10000) + @connection_id = params[:id] || rand(10000).to_s @name = params[:name].to_s @port = Port.new(params[:port]) @parent = params[:parent] require_adaptor(params[:adaptor] || :loopback)