Sha256: 9e5f516e08c1d214cf259ec41ba1bb1a1eb353d43e2a09f102e181c4aac6d527

Contents?: true

Size: 759 Bytes

Versions: 7

Compression:

Stored size: 759 Bytes

Contents

# Common functionality for Client and Server.
module CarrotRpc::ClientServer
  # @overload queue_name(new_name)
  #   @note Default naming not performed. Class must pass queue name.
  #
  #   Allows for class level definition of queue name.
  #
  #   @param new_name [String] the queue name for the class.
  #   @return [String] `new_name`
  #
  # @overload queue_name
  #   The current queue name previously set with `#queue_name(new_name)`.
  #
  #   @return [String]
  def queue_name(*args)
    if args.length == 0
      @queue_name
    elsif args.length == 1
      @queue_name = args[0]
    else
      fail ArgumentError,
           "queue_name(new_name) :: new_name or queue_name() :: current_name are the only ways to call queue_name"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
carrot_rpc-0.5.1 lib/carrot_rpc/client_server.rb
carrot_rpc-0.5.0 lib/carrot_rpc/client_server.rb
carrot_rpc-0.4.1 lib/carrot_rpc/client_server.rb
carrot_rpc-0.4.0 lib/carrot_rpc/client_server.rb
carrot_rpc-0.3.0 lib/carrot_rpc/client_server.rb
carrot_rpc-0.2.3 lib/carrot_rpc/client_server.rb
carrot_rpc-0.2.3.pre lib/carrot_rpc/client_server.rb