Module: Scalaroid

Defined in:
lib/scalaroid.rb,
lib/scalaroid/pub_sub.rb,
lib/scalaroid/version.rb,
lib/scalaroid/transaction.rb,
lib/scalaroid/delete_result.rb,
lib/scalaroid/json_req_list.rb,
lib/scalaroid/replicated_dht.rb,
lib/scalaroid/json_connection.rb,
lib/scalaroid/transaction_single_op.rb,
lib/scalaroid/json_req_list_transaction.rb,
lib/scalaroid/json_req_list_transaction_single_op.rb

Defined Under Namespace

Classes: DeleteResult, JSONConnection, JSONReqList, JSONReqListTransaction, JSONReqListTransactionSingleOp, PubSub, ReplicatedDHT, Transaction, TransactionSingleOp

Constant Summary collapse

DEFAULT_URL =
'http://localhost:8000'
DEFAULT_PATH =

path to the json rpc page

'/jsonrpc.yaws'
VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.str_to_list(value) ⇒ Object

Converts a string to a list of integers. If the expected value of a read operation is a list, the returned value could be (mistakenly) a string if it is a list of integers.



99
100
101
102
103
104
105
# File 'lib/scalaroid.rb', line 99

def str_to_list(value)
  if value.is_a?(String)
    return value.unpack("U*")
  else
    return value
  end
end